StaticTypesWriterController (Groovy 5.0.8)
Description: declaration: package: org.codehaus.groovy.classgen.asm.sc, class: StaticTypesWriterController

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

# Class StaticTypesWriterController

java.lang.Object
org.codehaus.groovy.classgen.asm.WriterController
org.codehaus.groovy.classgen.asm.DelegatingController
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
  Modifier and Type
  Field
  Description
  `protected boolean`
  `isInStaticallyCheckedMethod`

  ### Fields inherited from class org.codehaus.groovy.classgen.asm.WriterController

  `optimizeForInt`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticTypesWriterController(WriterController controller)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BinaryExpressionHelper`
  `getBinaryExpressionHelper()`
  `CallSiteWriter`
  `getCallSiteWriter()`
  `CallSiteWriter`
  `getCallSiteWriterFor(Expression expression)`
  `ClosureWriter`
  `getClosureWriter()`
  `InvocationWriter`
  `getInvocationWriter()`
  `LambdaWriter`
  `getLambdaWriter()`
  `MethodReferenceExpressionWriter`
  `getMethodReferenceExpressionWriter()`
  `CallSiteWriter`
  `getRegularCallSiteWriter()`
  `InvocationWriter`
  `getRegularInvocationWriter()`
  `StatementWriter`
  `getStatementWriter()`
  `TypeChooser`
  `getTypeChooser()`
  `UnaryExpressionHelper`
  `getUnaryExpressionHelper()`
  `void`
  `init(AsmClassGenerator asmClassGenerator, GeneratorContext gcon, org.objectweb.asm.ClassVisitor cv, ClassNode cn)`
  `boolean`
  `isFastPath()`
  `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(org.codehaus.groovy.ast.expr.Expression)`.
  `void`
  `setConstructorNode(ConstructorNode cn)`
  `void`
  `setMethodNode(MethodNode mn)`

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.DelegatingController

  `getAcg, getAssertionWriter, getBytecodeVersion, getClassName, getClassNode, getClassVisitor, getCompileStack, getConstructorNode, getContext, getCv, getInterfaceClassLoadingClass, getInternalBaseClassName, getInternalClassName, getLineNumber, getMethodNode, getMethodPointerExpressionWriter, getMethodVisitor, getOperandStack, getOutermostClass, getReturnType, getSourceUnit, isConstructor, isInGeneratedFunction, isInGeneratedFunctionConstructor, isInScriptBody, isNotClinit, isStaticConstructor, isStaticContext, isStaticMethod, resetLineNumber, setInterfaceClassLoadingClass, setLineNumber, setMethodVisitor, shouldOptimizeForInt, switchToFastPath, switchToSlowPath`

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.WriterController

  `getNextHelperMethodIndex, getSuperMethodNames, getThisType, visitLineNumber`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### isInStaticallyCheckedMethod

    protected boolean isInStaticallyCheckedMethod

- ## Constructor Details

  - ### StaticTypesWriterController

    public StaticTypesWriterController(WriterController controller)

- ## Method Details

  - ### init

    public void init(AsmClassGenerator asmClassGenerator, GeneratorContext gcon, org.objectweb.asm.ClassVisitor cv, ClassNode cn)
    Overrides:
      `init` in class `DelegatingController`

  - ### setMethodNode

    public void setMethodNode(MethodNode mn)
    Overrides:
      `setMethodNode` in class `DelegatingController`

  - ### setConstructorNode

    public void setConstructorNode(ConstructorNode cn)
    Overrides:
      `setConstructorNode` in class `DelegatingController`

  - ### methodHasDynamicResolution

    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(org.codehaus.groovy.ast.expr.Expression)`. The regular writer's per-method state must then be initialized at method entry.

  - ### isFastPath

    public boolean isFastPath()
    Overrides:
      `isFastPath` in class `DelegatingController`

  - ### getCallSiteWriter

    public CallSiteWriter getCallSiteWriter()
    Overrides:
      `getCallSiteWriter` in class `DelegatingController`

  - ### getCallSiteWriterFor

    public CallSiteWriter getCallSiteWriterFor(Expression expression)
    Overrides:
      `getCallSiteWriterFor` in class `DelegatingController`

  - ### getRegularCallSiteWriter

    public CallSiteWriter getRegularCallSiteWriter()

  - ### getStatementWriter

    public StatementWriter getStatementWriter()
    Overrides:
      `getStatementWriter` in class `DelegatingController`

  - ### getTypeChooser

    public TypeChooser getTypeChooser()
    Overrides:
      `getTypeChooser` in class `DelegatingController`

  - ### getInvocationWriter

    public InvocationWriter getInvocationWriter()
    Overrides:
      `getInvocationWriter` in class `DelegatingController`

  - ### getRegularInvocationWriter

    public InvocationWriter getRegularInvocationWriter()

  - ### getBinaryExpressionHelper

    public BinaryExpressionHelper getBinaryExpressionHelper()
    Overrides:
      `getBinaryExpressionHelper` in class `DelegatingController`

  - ### getMethodReferenceExpressionWriter

    public MethodReferenceExpressionWriter getMethodReferenceExpressionWriter()
    Overrides:
      `getMethodReferenceExpressionWriter` in class `DelegatingController`

  - ### getUnaryExpressionHelper

    public UnaryExpressionHelper getUnaryExpressionHelper()
    Overrides:
      `getUnaryExpressionHelper` in class `DelegatingController`

  - ### getClosureWriter

    public ClosureWriter getClosureWriter()
    Overrides:
      `getClosureWriter` in class `DelegatingController`

  - ### getLambdaWriter

    public LambdaWriter getLambdaWriter()
    Overrides:
      `getLambdaWriter` in class `DelegatingController`