Class DecompiledClassNode
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.ClassNode
org.codehaus.groovy.ast.decompiled.DecompiledClassNode
- All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>
,NodeMetaDataHandler
A
ClassNode
kind representing the classes coming from *.class files decompiled using ASM.- See Also:
-
Field Summary
Fields inherited from class org.codehaus.groovy.ast.ClassNode
clazz, EMPTY_ARRAY, isPrimaryNode, lazyInitLock, SUPER, THIS
Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotations
(ClassNode type) long
getDeclaredField
(String name) Finds a field matching the given name in this class.getDeclaredMethods
(String name) Returns a list of all methods with the given name from this class.Gets the record components of record type.Returns the concrete class this classnode relates to.getUnresolvedInterfaces
(boolean useRedirect) getUnresolvedSuperClass
(boolean useRedirect) boolean
boolean
boolean
isSealed()
boolean
void
setGenericsPlaceHolder
(boolean b) void
setRedirect
(ClassNode cn) Sets this instance as proxy for the givenClassNode
.void
setUsingGenerics
(boolean b) Methods inherited from class org.codehaus.groovy.ast.ClassNode
addConstructor, addConstructor, addField, addField, addFieldFirst, addFieldFirst, addInterface, addMethod, addMethod, addMixin, addObjectInitializerStatements, addProperty, addProperty, addStaticInitializerStatements, addSyntheticMethod, addTransform, addTypeAnnotation, addTypeAnnotations, asGenericsType, declaresAnyInterfaces, declaresInterface, equals, getAbstractMethods, getAllDeclaredMethods, getAllInterfaces, getCompileUnit, getComponentType, getDeclaredConstructor, getDeclaredMethod, getDeclaredMethodsMap, getEnclosingMethod, getField, getFieldIndex, getGetterMethod, getGetterMethod, getInnerClasses, getMethod, getMethods, getMixins, getModifiers, getModule, getName, getNameWithoutPackage, getObjectInitializerStatements, getOuterClass, getOuterClasses, getOuterField, getPackage, getPackageName, getPermittedSubclasses, getPlainNodeReference, getPlainNodeReference, getProperties, getProperty, getSetterMethod, getSetterMethod, getSuperClass, getText, getTransforms, getTypeAnnotations, getTypeAnnotations, getUnresolvedInterfaces, getUnresolvedName, getUnresolvedSuperClass, hasDeclaredMethod, hashCode, hasMethod, hasPackageName, hasPossibleMethod, hasPossibleStaticMethod, hasProperty, implementsAnyInterfaces, implementsInterface, isAbstract, isAnnotated, isAnnotationDefinition, isArray, isDerivedFrom, isDerivedFromGroovyObject, isEnum, isGenericsPlaceHolder, isInterface, isPrimaryClassNode, isRecord, isRedirectNode, isScript, isScriptBody, isStaticClass, isSyntheticPublic, makeArray, parametersEqual, positionStmtsAfterEnumInitStmts, redirect, removeConstructor, removeField, removeMethod, renameField, setAnnotated, setCompileUnit, setEnclosingMethod, setGenericsTypes, setInterfaces, setMixins, setModifiers, setModule, setPermittedSubclasses, setRecordComponents, setScript, setScriptBody, setStaticClass, setSuperClass, setSyntheticPublic, setUnresolvedSuperClass, toString, toString, tryFindPossibleMethod, visitContents
Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, 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, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Constructor Details
-
DecompiledClassNode
-
-
Method Details
-
getCompilationTimeStamp
public long getCompilationTimeStamp() -
getTypeClass
Description copied from class:ClassNode
Returns the concrete class this classnode relates to. However, this method is inherently unsafe as it may return null depending on the compile phase you are using. AST transformations should never use this method directly, but rather obtain a new class node usingClassNode.getPlainNodeReference()
.- Overrides:
getTypeClass
in classClassNode
- Returns:
- the class this classnode relates to. May return null.
-
isParameterized
public boolean isParameterized() -
isResolved
public boolean isResolved()- Overrides:
isResolved
in classClassNode
-
isSealed
public boolean isSealed() -
setName
-
setRedirect
Description copied from class:ClassNode
Sets this instance as proxy for the givenClassNode
.- Overrides:
setRedirect
in classClassNode
- Parameters:
cn
- the class to redirect to; ifnull
the redirect is removed
-
setUsingGenerics
public void setUsingGenerics(boolean b) - Overrides:
setUsingGenerics
in classClassNode
-
setGenericsPlaceHolder
public void setGenericsPlaceHolder(boolean b) - Overrides:
setGenericsPlaceHolder
in classClassNode
-
getAnnotations
- Overrides:
getAnnotations
in classClassNode
-
getAnnotations
- Overrides:
getAnnotations
in classClassNode
-
getGenericsTypes
- Overrides:
getGenericsTypes
in classClassNode
-
getInterfaces
- Overrides:
getInterfaces
in classClassNode
- Returns:
- the interfaces implemented by this
ClassNode
-
getRecordComponents
Description copied from class:ClassNode
Gets the record components of record type.- Overrides:
getRecordComponents
in classClassNode
- Returns:
RecordComponentNode
instances
-
getUnresolvedInterfaces
- Overrides:
getUnresolvedInterfaces
in classClassNode
-
getUnresolvedSuperClass
- Overrides:
getUnresolvedSuperClass
in classClassNode
-
isUsingGenerics
public boolean isUsingGenerics()- Overrides:
isUsingGenerics
in classClassNode
-
getDeclaredConstructors
- Overrides:
getDeclaredConstructors
in classClassNode
-
getDeclaredField
Description copied from class:ClassNode
Finds a field matching the given name in this class.- Overrides:
getDeclaredField
in classClassNode
- Parameters:
name
- the name of the field of interest- Returns:
- the method matching the given name and parameters or null
-
getDeclaredMethods
Description copied from class:ClassNode
Returns a list of all methods with the given name from this class.- Overrides:
getDeclaredMethods
in classClassNode
- Returns:
- method list (possibly empty)
- See Also:
-
getFields
-
getMethods
- Overrides:
getMethods
in classClassNode
- Returns:
- the methods associated with this
ClassNode
-