Package: org.codehaus.groovy.transform

## [Java] Class InheritConstructorsASTStubber

- org.codehaus.groovy.transform.InheritConstructorsASTStubber

-     @GroovyASTTransformation(phase = CompilePhase.CONVERSION)
      public class InheritConstructorsASTStubber
      extends AbstractASTTransformation

  Joint-compilation stubber for InheritConstructors. Walks the superclass's declared constructors and adds a placeholder constructor on the annotated subclass for each non-private signature not already present — mirroring the surface the full transform produces at CANONICALIZATION, but at CONVERSION so the joint-compilation stub reflects it.

  The placeholder body is `super(args)` to ensure the generated stub Java file compiles cleanly even when the super class has no no-arg constructor; the full transform discards the stubber-tagged placeholder before installing its real body.

  Recursive case. If the superclass also carries `@InheritConstructors`, this stubber pre-processes it (the same idiom the full transform uses), so chains like Sub ? Mid ? Base flatten correctly within the stubber pass.

  Boundary. When the super class is in the same compilation unit and its constructors come from another CONVERSION-phase stubber (`@TupleConstructor`, `@MapConstructor`), visibility depends on within-phase iteration order: super-declared-first sees those constructors, sub-declared-first does not. The stub remains a subset of the runtime — Java callers reaching for sub's stub get a compile error for non-stubbed signatures rather than a stub/runtime divergence. The full transform at CANONICALIZATION still produces the complete surface at runtime.

  Since:
    6.0.0

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractASTTransformation` | `RETENTION_CLASSNODE, sourceUnit`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `visit(ASTNode[] nodes, SourceUnit source)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractASTTransformation` | `addError, checkIncludeExcludeUndefinedAware, checkIncludeExcludeUndefinedAware, checkNotInterface, checkPropertyList, checkPropertyList, checkPropertyList, copyAnnotatedNodeAnnotations, copyAnnotatedNodeAnnotations, deemedInternal, deemedInternalName, getAnnotationName, getMemberClassList, getMemberClassValue, getMemberClassValue, getMemberIntValue, getMemberStringList, getMemberStringValue, getMemberStringValue, getMemberValue, hasAnnotation, init, markAsInternal, memberHasValue, shouldSkip, shouldSkip, shouldSkip, shouldSkipOnDescriptorUndefinedAware, shouldSkipUndefinedAware, shouldSkipUndefinedAware, shouldSkipUndefinedAware, tokenize`

- - ### Method Detail

    - #### public void visit(ASTNode[] nodes, SourceUnit source)