StaticTypesWriterController (Groovy 5.0.8)

Package: org.codehaus.groovy.classgen.asm.sc

## [Java] Class StaticTypesWriterController

- org.codehaus.groovy.classgen.asm.sc.StaticTypesWriterController

-     public class StaticTypesWriterController
      extends DelegatingController

  An alternative WriterController which handles static types and method dispatch. In case of a "mixed mode" where only some methods are annotated with TypeChecked then this writer will delegate to the classic writer controller.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected boolean` | `isInStaticallyCheckedMethod` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class WriterController` | `optimizeForInt`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `StaticTypesWriterController(WriterController controller)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public BinaryExpressionHelper` | `getBinaryExpressionHelper()`
    `` | `public CallSiteWriter` | `getCallSiteWriter()`
    `` | `public CallSiteWriter` | `getCallSiteWriterFor(Expression expression)`
    `` | `public ClosureWriter` | `getClosureWriter()`
    `` | `public InvocationWriter` | `getInvocationWriter()`
    `` | `public LambdaWriter` | `getLambdaWriter()`
    `` | `public MethodReferenceExpressionWriter` | `getMethodReferenceExpressionWriter()`
    `` | `public CallSiteWriter` | `getRegularCallSiteWriter()`
    `` | `public InvocationWriter` | `getRegularInvocationWriter()`
    `` | `public StatementWriter` | `getStatementWriter()`
    `` | `public TypeChooser` | `getTypeChooser()`
    `` | `public UnaryExpressionHelper` | `getUnaryExpressionHelper()`
    `` | `public void` | `init(AsmClassGenerator asmClassGenerator, GeneratorContext gcon, org.objectweb.asm.ClassVisitor cv, ClassNode cn)`
    `` | `public boolean` | `isFastPath()`
    `` | `public boolean` | `methodHasDynamicResolution()` GROOVY-11968: returns `true` when the current statically compiled method contains one or more sub-expressions that will be routed through the regular (non-static) call site writer via getCallSiteWriterFor.
    `` | `public void` | `setConstructorNode(ConstructorNode cn)`
    `` | `public void` | `setMethodNode(MethodNode mn)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DelegatingController` | `getAcg, getAssertionWriter, getBinaryExpressionHelper, getBytecodeVersion, getCallSiteWriter, getCallSiteWriterFor, getClassName, getClassNode, getClassVisitor, getClosureWriter, getCompileStack, getConstructorNode, getContext, getCv, getInterfaceClassLoadingClass, getInternalBaseClassName, getInternalClassName, getInvocationWriter, getLambdaWriter, getLineNumber, getMethodNode, getMethodPointerExpressionWriter, getMethodReferenceExpressionWriter, getMethodVisitor, getOperandStack, getOutermostClass, getReturnType, getSourceUnit, getStatementWriter, getTypeChooser, getUnaryExpressionHelper, init, isConstructor, isFastPath, isInGeneratedFunction, isInGeneratedFunctionConstructor, isInScriptBody, isNotClinit, isStaticConstructor, isStaticContext, isStaticMethod, resetLineNumber, setConstructorNode, setInterfaceClassLoadingClass, setLineNumber, setMethodNode, setMethodVisitor, shouldOptimizeForInt, switchToFastPath, switchToSlowPath`
    `class WriterController` | `getAcg, getAssertionWriter, getBinaryExpressionHelper, getBytecodeVersion, getCallSiteWriter, getCallSiteWriterFor, getClassName, getClassNode, getClassVisitor, getClosureWriter, getCompileStack, getConstructorNode, getContext, getCv, getInterfaceClassLoadingClass, getInternalBaseClassName, getInternalClassName, getInvocationWriter, getLambdaWriter, getLineNumber, getMethodNode, getMethodPointerExpressionWriter, getMethodReferenceExpressionWriter, getMethodVisitor, getNextHelperMethodIndex, getOperandStack, getOutermostClass, getReturnType, getSourceUnit, getStatementWriter, getSuperMethodNames, getThisType, getTypeChooser, getUnaryExpressionHelper, init, isConstructor, isFastPath, isInGeneratedFunction, isInGeneratedFunctionConstructor, isInScriptBody, isNotClinit, isStaticConstructor, isStaticContext, isStaticMethod, resetLineNumber, setConstructorNode, setInterfaceClassLoadingClass, setLineNumber, setMethodNode, setMethodVisitor, shouldOptimizeForInt, switchToFastPath, switchToSlowPath, visitLineNumber`

- - ### Field Detail

    - #### protected boolean isInStaticallyCheckedMethod

  - ### Constructor Detail

    - #### public StaticTypesWriterController(WriterController controller)

  - ### Method Detail

    - #### @Override
      public BinaryExpressionHelper getBinaryExpressionHelper()

    - #### @Override
      public CallSiteWriter getCallSiteWriter()

    - #### @Override
      public CallSiteWriter getCallSiteWriterFor(Expression expression)

    - #### @Override
      public ClosureWriter getClosureWriter()

    - #### @Override
      public InvocationWriter getInvocationWriter()

    - #### @Override
      public LambdaWriter getLambdaWriter()

    - #### @Override
      public MethodReferenceExpressionWriter getMethodReferenceExpressionWriter()

    - #### public CallSiteWriter getRegularCallSiteWriter()

    - #### public InvocationWriter getRegularInvocationWriter()

    - #### @Override
      public StatementWriter getStatementWriter()

    - #### @Override
      public TypeChooser getTypeChooser()

    - #### @Override
      public UnaryExpressionHelper getUnaryExpressionHelper()

    - #### @Override
      public void init(AsmClassGenerator asmClassGenerator, GeneratorContext gcon, org.objectweb.asm.ClassVisitor cv, ClassNode cn)

    - #### @Override
      public boolean isFastPath()

    - #### public boolean methodHasDynamicResolution()

      GROOVY-11968: returns `true` when the current statically compiled method contains one or more sub-expressions that will be routed through the regular (non-static) call site writer via getCallSiteWriterFor. The regular writer's per-method state must then be initialized at method entry.

    - #### @Override
      public void setConstructorNode(ConstructorNode cn)

    - #### @Override
      public void setMethodNode(MethodNode mn)