Package org.codehaus.groovy.ast

# Class InnerClassNode

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.ClassNode
org.codehaus.groovy.ast.InnerClassNode

All Implemented Interfaces:
  `GroovydocHolder<AnnotatedNode>`, `NodeMetaDataHandler`

Direct Known Subclasses:
  `EnumConstantClassNode`, `InterfaceHelperClassNode`

public class InnerClassNode extends ClassNode
Represents an inner class declaration

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.ast.ClassNode

  `clazz, EMPTY_ARRAY, innerClasses, isPrimaryNode, lazyInitLock, SUPER, THIS`

  ### Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder

  `DOC_COMMENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InnerClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass)`
  `InnerClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass, ClassNode[] interfaces, MixinNode[] mixins)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ConstructorNode`
  `addConstructor(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code)`
  `void`
  `addConstructor(ConstructorNode node)`
  `ClassNode`
  `getOuterClass()`
  `FieldNode`
  `getOuterField(String name)`
  `ClassNode`
  `getOuterMostClass()`
  `VariableScope`
  `getVariableScope()`
  `boolean`
  `isAnonymous()`
  `void`
  `setAnonymous(boolean anonymous)`
  `void`
  `setVariableScope(VariableScope scope)`

  ### Methods inherited from class org.codehaus.groovy.ast.ClassNode

  `addField, addField, addFieldFirst, addFieldFirst, addInterface, addMethod, addMethod, addMixin, addObjectInitializerStatements, addProperty, addProperty, addStaticInitializerStatements, addSyntheticMethod, addTransform, addTypeAnnotation, addTypeAnnotations, asGenericsType, declaresAnyInterfaces, declaresInterface, equals, getAbstractMethods, getAllDeclaredMethods, getAllInterfaces, getAnnotations, getAnnotations, getCompileUnit, getComponentType, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getDeclaredMethodsMap, getEnclosingMethod, getField, getFieldIndex, getFields, getGenericsTypes, getGetterMethod, getGetterMethod, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getMixins, getModifiers, getModule, getName, getNameWithoutPackage, getObjectInitializerStatements, getOuterClasses, getPackage, getPackageName, getPermittedSubclasses, getPlainNodeReference, getPlainNodeReference, getProperties, getProperty, getRecordComponentNodes, getRecordComponents, getSetterMethod, getSetterMethod, getSuperClass, getText, getTransforms, getTypeAnnotations, getTypeAnnotations, getTypeClass, getUnresolvedInterfaces, getUnresolvedInterfaces, getUnresolvedName, getUnresolvedSuperClass, getUnresolvedSuperClass, hasDeclaredMethod, hashCode, hasMethod, hasPackageName, hasPossibleMethod, hasPossibleStaticMethod, hasProperty, implementsAnyInterfaces, implementsInterface, isAbstract, isAnnotated, isAnnotationDefinition, isArray, isDerivedFrom, isDerivedFromGroovyObject, isEnum, isGenericsPlaceHolder, isInterface, isPrimaryClassNode, isRecord, isRedirectNode, isResolved, isScript, isScriptBody, isSealed, isStaticClass, isSyntheticPublic, isUsingGenerics, makeArray, parametersEqual, positionStmtsAfterEnumInitStmts, redirect, removeConstructor, removeField, removeMethod, renameField, setAnnotated, setCompileUnit, setEnclosingMethod, setGenericsPlaceHolder, setGenericsTypes, setInterfaces, setMixins, setModifiers, setModule, setName, setPermittedSubclasses, setRecordComponentNodes, setRecordComponents, setRedirect, setScript, setScriptBody, setStaticClass, setSuperClass, setSyntheticPublic, setUnresolvedSuperClass, setUsingGenerics, toString, toString, tryFindPossibleMethod, visitContents`

  ### Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode

  `addAnnotation, addAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`

  ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

  `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData`

- ## Constructor Details

  - ### InnerClassNode

    public InnerClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass)
    Parameters:
      `name` - is the full name of the class
      `modifiers` - the modifiers, @see org.objectweb.asm.Opcodes
      `superClass` - the base class name - use "java.lang.Object" if no direct base class

  - ### InnerClassNode

    public InnerClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass, ClassNode[] interfaces, MixinNode[] mixins)
    Parameters:
      `name` - is the full name of the class
      `modifiers` - the modifiers, @see org.objectweb.asm.Opcodes
      `superClass` - the base class name - use "java.lang.Object" if no direct base class

- ## Method Details

  - ### getOuterClass

    public ClassNode getOuterClass()
    Overrides:
      `getOuterClass` in class `ClassNode`

  - ### getOuterMostClass

    public ClassNode getOuterMostClass()

  - ### getOuterField

    public FieldNode getOuterField(String name)
    Overrides:
      `getOuterField` in class `ClassNode`
    Returns:
      the field node on the outer class or null if this is not an inner class

  - ### getVariableScope

    public VariableScope getVariableScope()

  - ### setVariableScope

    public void setVariableScope(VariableScope scope)

  - ### isAnonymous

    public boolean isAnonymous()

  - ### setAnonymous

    public void setAnonymous(boolean anonymous)

  - ### addConstructor

    public void addConstructor(ConstructorNode node)
    Overrides:
      `addConstructor` in class `ClassNode`

  - ### addConstructor

    public ConstructorNode addConstructor(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code)
    Overrides:
      `addConstructor` in class `ClassNode`