Class CompilationUnit
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.decompiler.languages.java.ast.AstNode
-
- com.strobel.decompiler.languages.java.ast.CompilationUnit
-
- All Implemented Interfaces:
UserDataStore,IFreezable,INode,java.lang.Cloneable
public class CompilationUnit extends AstNode
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String_fileNameprivate AstNode_topExpressionstatic Role<ImportDeclaration>IMPORT_ROLEstatic Role<ModuleDeclaration>MODULE_ROLEstatic Role<TypeDeclaration>TYPE_ROLE-
Fields inherited from class com.strobel.decompiler.languages.java.ast.AstNode
AST_NODE_USED_FLAGS, flags, FROZEN_BIT, NULL, ROLE_INDEX_MASK, ROOT_ROLE
-
Fields inherited from interface com.strobel.decompiler.patterns.INode
CHILD_ITERATOR
-
-
Constructor Summary
Constructors Constructor Description CompilationUnit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
RacceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)java.lang.StringgetFileName()AstNodeCollection<ImportDeclaration>getImports()NodeTypegetNodeType()PackageDeclarationgetPackage()Role<? extends CompilationUnit>getRole()AstNodegetTopExpression()AstNodeCollection<TypeDeclaration>getTypes()java.lang.Iterable<TypeDeclaration>getTypes(boolean includeInnerTypes)booleanmatches(INode other, Match match)voidsetFileName(java.lang.String fileName)voidsetPackage(PackageDeclaration value)(package private) voidsetTopExpression(AstNode topExpression)-
Methods inherited from class com.strobel.decompiler.languages.java.ast.AstNode
addChild, addChildUnsafe, clone, contains, contains, copyUserDataFrom, debugToString, forPattern, freezeCore, getAncestors, getAncestors, getAncestorsAndSelf, getChildByRole, getChildren, getChildrenByRole, getDescendants, getDescendantsAndSelf, getEndLocation, getFirstChild, getLastChild, getNextNode, getNextSibling, getNextSibling, getParent, getParent, getPreviousNode, getPreviousSibling, getPreviousSibling, getRegion, getStartLocation, getText, getText, getUserData, hasChildren, insertChildAfter, insertChildBefore, insertChildBeforeUnsafe, insertChildrenAfter, insertChildrenBefore, isAncestorOf, isAncestorOf, isDescendantOf, isInside, isInside, isLoop, isNull, isReference, isUnconditionalBranch, makeOptional, match, matches, matchesCollection, matchString, putUserData, putUserDataIfAbsent, remove, replace, replaceWith, replaceWith, setChildByRole, setRole, setRoleUnsafe, toString, withName
-
Methods inherited from class com.strobel.core.Freezable
canFreeze, freeze, freezeIfUnfrozen, isFrozen, tryFreeze, verifyFrozen, verifyNotFrozen
-
-
-
-
Field Detail
-
TYPE_ROLE
public static final Role<TypeDeclaration> TYPE_ROLE
-
MODULE_ROLE
public static final Role<ModuleDeclaration> MODULE_ROLE
-
IMPORT_ROLE
public static final Role<ImportDeclaration> IMPORT_ROLE
-
_topExpression
private AstNode _topExpression
-
_fileName
private java.lang.String _fileName
-
-
Method Detail
-
getImports
public final AstNodeCollection<ImportDeclaration> getImports()
-
getPackage
public final PackageDeclaration getPackage()
-
setPackage
public final void setPackage(PackageDeclaration value)
-
getFileName
public final java.lang.String getFileName()
-
setFileName
public final void setFileName(java.lang.String fileName)
-
getTopExpression
public final AstNode getTopExpression()
-
setTopExpression
final void setTopExpression(AstNode topExpression)
-
getTypes
public final AstNodeCollection<TypeDeclaration> getTypes()
-
getRole
public Role<? extends CompilationUnit> getRole()
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeTypein classAstNode
-
acceptVisitor
public <T,R> R acceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
- Specified by:
acceptVisitorin classAstNode
-
getTypes
public java.lang.Iterable<TypeDeclaration> getTypes(boolean includeInnerTypes)
-
-