Package org.codehaus.groovy.ast.decompiled

# 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`

public class DecompiledClassNode extends ClassNode
A `ClassNode` kind representing the classes coming from *.class files decompiled using ASM.

See Also:
  - `AsmDecompiler`

- ## 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
  `DecompiledClassNode(ClassStub classData, AsmReferenceResolver resolver)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<AnnotationNode>`
  `getAnnotations()`
  `List<AnnotationNode>`
  `getAnnotations(ClassNode type)`
  `long`
  `getCompilationTimeStamp()`
  `List<ConstructorNode>`
  `getDeclaredConstructors()`
  `FieldNode`
  `getDeclaredField(String name)`
  Finds a field matching the given name in this class.
  `List<MethodNode>`
  `getDeclaredMethods(String name)`
  This methods returns a list of all methods of the given name defined in the current class
  `List<FieldNode>`
  `getFields()`
  `GenericsType[]`
  `getGenericsTypes()`
  `ClassNode[]`
  `getInterfaces()`
  `List<MethodNode>`
  `getMethods()`
  `List<RecordComponentNode>`
  `getRecordComponents()`
  Get the record components of record types
  `Class`
  `getTypeClass()`
  Returns the concrete class this classnode relates to.
  `ClassNode[]`
  `getUnresolvedInterfaces(boolean useRedirect)`
  `ClassNode`
  `getUnresolvedSuperClass(boolean useRedirect)`
  `boolean`
  `isParameterized()`
  `boolean`
  `isResolved()`
  `boolean`
  `isSealed()`
  `boolean`
  `isUsingGenerics()`
  `void`
  `setGenericsPlaceHolder(boolean b)`
  `String`
  `setName(String name)`
  `void`
  `setRedirect(ClassNode cn)`
  Sets this instance as proxy for the given `ClassNode`.
  `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, getRecordComponentNodes, 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, setRecordComponentNodes, setRecordComponents, setScript, setScriptBody, setStaticClass, setSuperClass, setSyntheticPublic, setUnresolvedSuperClass, 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

  - ### DecompiledClassNode

    public DecompiledClassNode(ClassStub classData, AsmReferenceResolver resolver)

- ## Method Details

  - ### getCompilationTimeStamp

    public long getCompilationTimeStamp()

  - ### getGenericsTypes

    public GenericsType[] getGenericsTypes()
    Overrides:
      `getGenericsTypes` in class `ClassNode`

  - ### isUsingGenerics

    public boolean isUsingGenerics()
    Overrides:
      `isUsingGenerics` in class `ClassNode`

  - ### getFields

    public List<FieldNode> getFields()
    Overrides:
      `getFields` in class `ClassNode`
    Returns:
      the fields associated with this `ClassNode`

  - ### getInterfaces

    public ClassNode[] getInterfaces()
    Overrides:
      `getInterfaces` in class `ClassNode`
    Returns:
      the interfaces implemented by this `ClassNode`

  - ### getMethods

    public List<MethodNode> getMethods()
    Overrides:
      `getMethods` in class `ClassNode`
    Returns:
      the methods associated with this `ClassNode`

  - ### getDeclaredConstructors

    public List<ConstructorNode> getDeclaredConstructors()
    Overrides:
      `getDeclaredConstructors` in class `ClassNode`

  - ### getDeclaredField

    public FieldNode getDeclaredField(String name)
    Description copied from class: `ClassNode`
    Finds a field matching the given name in this class.
    Overrides:
      `getDeclaredField` in class `ClassNode`
    Parameters:
      `name` - the name of the field of interest
    Returns:
      the method matching the given name and parameters or null

  - ### getDeclaredMethods

    public List<MethodNode> getDeclaredMethods(String name)
    Description copied from class: `ClassNode`
    This methods returns a list of all methods of the given name defined in the current class
    Overrides:
      `getDeclaredMethods` in class `ClassNode`
    Returns:
      the method list
    See Also:
      - `ClassNode.getMethods(String)`

  - ### getUnresolvedSuperClass

    public ClassNode getUnresolvedSuperClass(boolean useRedirect)
    Overrides:
      `getUnresolvedSuperClass` in class `ClassNode`

  - ### getUnresolvedInterfaces

    public ClassNode[] getUnresolvedInterfaces(boolean useRedirect)
    Overrides:
      `getUnresolvedInterfaces` in class `ClassNode`

  - ### getAnnotations

    public List<AnnotationNode> getAnnotations()
    Overrides:
      `getAnnotations` in class `ClassNode`

  - ### getAnnotations

    public List<AnnotationNode> getAnnotations(ClassNode type)
    Overrides:
      `getAnnotations` in class `ClassNode`

  - ### setRedirect

    public void setRedirect(ClassNode cn)
    Description copied from class: `ClassNode`
    Sets this instance as proxy for the given `ClassNode`.
    Overrides:
      `setRedirect` in class `ClassNode`
    Parameters:
      `cn` - the class to redirect to; if `null` the redirect is removed

  - ### setGenericsPlaceHolder

    public void setGenericsPlaceHolder(boolean b)
    Overrides:
      `setGenericsPlaceHolder` in class `ClassNode`

  - ### setUsingGenerics

    public void setUsingGenerics(boolean b)
    Overrides:
      `setUsingGenerics` in class `ClassNode`

  - ### setName

    public String setName(String name)
    Overrides:
      `setName` in class `ClassNode`

  - ### isParameterized

    public boolean isParameterized()

  - ### isResolved

    public boolean isResolved()
    Overrides:
      `isResolved` in class `ClassNode`

  - ### isSealed

    public boolean isSealed()
    Overrides:
      `isSealed` in class `ClassNode`

  - ### getRecordComponents

    public List<RecordComponentNode> getRecordComponents()
    Get the record components of record types
    Overrides:
      `getRecordComponents` in class `ClassNode`
    Returns:
      `RecordComponentNode` instances
    Since:
      4.0.0

  - ### getTypeClass

    public Class 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 using `ClassNode.getPlainNodeReference()`.
    Overrides:
      `getTypeClass` in class `ClassNode`
    Returns:
      the class this classnode relates to. May return null.