Groovy 2.2.1

org.codehaus.groovy.ast
[Java] 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

public class InnerClassNode
extends ClassNode

Represents an inner class declaration

Authors:
James Strachan
Version:
\$Revision\$


Field Summary
 
Fields inherited from class ClassNode
EMPTY_ARRAY, SUPER, THIS, clazz, innerClasses, isPrimaryNode, lazyInitLock
 
Constructor Summary
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

 
Method Summary
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)

 
Methods inherited from class ClassNode
ClassNode, ClassNode, ClassNode, addConstructor, addConstructor, addField, addField, addFieldFirst, addFieldFirst, addInterface, addMethod, addMethod, addMixin, addObjectInitializerStatements, addProperty, addProperty, addStaticInitializerStatements, addSyntheticMethod, addTransform, declaresInterface, equals, getAbstractMethods, getAllDeclaredMethods, getAllInterfaces, getAnnotations, getAnnotations, getCompileUnit, getComponentType, getDeclaredConstructors, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getDeclaredMethodsMap, getEnclosingMethod, getField, getFields, getGenericsTypes, getGetterMethod, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getMixins, getModifiers, getModule, getName, getNameWithoutPackage, getObjectInitializerStatements, getOuterClass, getOuterField, getPackage, getPackageName, getPlainNodeReference, getProperties, getProperty, getSetterMethod, getSetterMethod, getSuperClass, getText, getTransforms, getTypeClass, getUnresolvedInterfaces, getUnresolvedInterfaces, getUnresolvedName, getUnresolvedSuperClass, getUnresolvedSuperClass, hasDeclaredMethod, hasMethod, hasPackageName, hasPossibleMethod, hasPossibleStaticMethod, hasProperty, hashCode, implementsInterface, isAnnotated, isAnnotationDefinition, isArray, isDerivedFrom, isDerivedFromGroovyObject, isEnum, isGenericsPlaceHolder, isInterface, isPrimaryClassNode, isRedirectNode, isResolved, isScript, isScriptBody, isStaticClass, isSyntheticPublic, isUsingGenerics, makeArray, parametersEqual, positionStmtsAfterEnumInitStmts, redirect, removeField, renameField, setAnnotated, setCompileUnit, setEnclosingMethod, setGenericsPlaceHolder, setGenericsTypes, setInterfaces, setModifiers, setModule, setName, setRedirect, setScript, setScriptBody, setStaticClass, setSuperClass, setSyntheticPublic, setUnresolvedSuperClass, setUsingGenerics, toString, toString, tryFindPossibleMethod, visitContents
 
Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
 
Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

InnerClassNode

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


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,
superClass - the base class name - use "java.lang.Object" if no direct base class
See Also:
org.objectweb.asm.Opcodes


 
Method Detail

addConstructor

@Override
public void addConstructor(ConstructorNode node)


addConstructor

@Override
public ConstructorNode addConstructor(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code)


getOuterClass

public ClassNode getOuterClass()


getOuterField

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


getOuterMostClass

public ClassNode getOuterMostClass()


getVariableScope

public VariableScope getVariableScope()


isAnonymous

public boolean isAnonymous()


setAnonymous

public void setAnonymous(boolean anonymous)


setVariableScope

public void setVariableScope(VariableScope scope)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.