[Java] Class InnerClassNode
- org.codehaus.groovy.ast.InnerClassNode
Represents an inner class declaration
- Authors:
- James Strachan
Fields inherited from class | Fields |
---|---|
class ClassNode | EMPTY_ARRAY, SUPER, THIS, clazz, innerClasses, isPrimaryNode, lazyInitLock |
Constructor Summary
Constructor and description |
---|
InnerClassNode
(ClassNode outerClass, String name, int modifiers, ClassNode superClass) @param name is the full name of the class |
InnerClassNode
(ClassNode outerClass, String name, int modifiers, ClassNode superClass, ClassNode[] interfaces, MixinNode[] mixins) @param name is the full name of the class |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
void |
addConstructor(ConstructorNode node) | |
ConstructorNode |
addConstructor(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code) | |
ClassNode |
getOuterClass() | |
FieldNode |
getOuterField(String name) @return the field node on the outer class or null if this is not an inner class | |
ClassNode |
getOuterMostClass() | |
VariableScope |
getVariableScope() | |
boolean |
isAnonymous() | |
void |
setAnonymous(boolean anonymous) | |
void |
setVariableScope(VariableScope scope) |
Inherited Methods Summary
Constructor Detail
public InnerClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass)
- Parameters:
-
name
- is the full name of the class -
modifiers
- the modifiers, -
superClass
- the base class name - use "java.lang.Object" if no direct base class
- See Also:
- org.objectweb.asm.Opcodes
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, -
superClass
- the base class name - use "java.lang.Object" if no direct base class
- See Also:
- org.objectweb.asm.Opcodes
Method Detail
@Override public void addConstructor(ConstructorNode node)
@Override public ConstructorNode addConstructor(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code)
public ClassNode getOuterClass()
public FieldNode getOuterField(String name)
- Returns:
- the field node on the outer class or null if this is not an inner class
public ClassNode getOuterMostClass()
public VariableScope getVariableScope()
public boolean isAnonymous()
public void setAnonymous(boolean anonymous)
public void setVariableScope(VariableScope scope)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/ast/InnerClassNode.html