Class AstBuilder
java.lang.Object
com.strobel.decompiler.languages.java.ast.AstBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompilationUnit
private final DecompilerContext
private boolean
private boolean
private final TextNode
private int
private final Map
<String, Reference<TypeDeclaration>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addType
(TypeDefinition type) (package private) static void
addTypeArguments
(TypeReference type, AstType astType) private void
addTypeMembers
(TypeDeclaration astType, TypeDefinition type) (package private) static void
applyTypeArguments
(AstType baseType, List<AstType> typeArguments) final boolean
convertType
(TypeReference type) (package private) final AstType
convertType
(TypeReference type, MutableInteger typeIndex, ConvertTypeOptions options) convertType
(TypeReference type, ConvertTypeOptions options) createAnnotation
(CustomAnnotation annotation) createAnnotationElement
(AnnotationElement element) private ConstructorDeclaration
createConstructor
(MethodDefinition method) private FieldDeclaration
createField
(FieldDefinition field) final MethodDeclaration
createMethod
(MethodDefinition method) private BlockStatement
createMethodBody
(MethodDefinition method, Iterable<ParameterDeclaration> parameters) protected final ModuleDeclaration
createModuleNoCache
(TypeDefinition type, ModuleAttribute attribute) final List
<ParameterDeclaration> createParameters
(Iterable<ParameterDefinition> parameters) final TypeDeclaration
createType
(TypeDefinition type) private TypeDeclaration
createTypeCore
(TypeDefinition type) protected final TypeDeclaration
(package private) final List
<TypeParameterDeclaration> createTypeParameters
(List<GenericParameter> genericParameters) private static Integer
private static TypeReference
findLocalType
(TypeReference type) generateCode
(ITextOutput output) final CompilationUnit
(package private) final DecompilerContext
final boolean
private boolean
static boolean
isMemberHidden
(IMemberDefinition member, DecompilerContext context) static Expression
static Expression
makePrimitive
(long val, TypeReference type) final void
final void
runTransformations
(Predicate<IAstTransform> transformAbortCondition) private long
scrubAccessModifiers
(long flags) final void
setDecompileMethodBodies
(boolean decompileMethodBodies) private static void
sortNestedTypes
(List<TypeDefinition> types) final SafeCloseable
-
Field Details
-
_context
-
_compileUnit
-
_typeDeclarations
-
_unqualifiedTypeNames
-
_packagePlaceholder
-
_decompileMethodBodies
private boolean _decompileMethodBodies -
_haveTransformationsRun
private boolean _haveTransformationsRun -
_suppressImportsDepth
private int _suppressImportsDepth
-
-
Constructor Details
-
AstBuilder
-
-
Method Details
-
getContext
-
areImportsSuppressed
public final boolean areImportsSuppressed() -
suppressImports
-
getDecompileMethodBodies
public final boolean getDecompileMethodBodies() -
setDecompileMethodBodies
public final void setDecompileMethodBodies(boolean decompileMethodBodies) -
getCompilationUnit
-
runTransformations
public final void runTransformations() -
runTransformations
-
addType
-
createType
-
createModuleNoCache
protected final ModuleDeclaration createModuleNoCache(TypeDefinition type, ModuleAttribute attribute) -
createTypeNoCache
-
convertType
-
convertType
-
createParameters
-
convertType
-
isContextWithinType
-
createTypeCore
-
scrubAccessModifiers
private long scrubAccessModifiers(long flags) -
addTypeMembers
-
sortNestedTypes
-
findFirstLineNumber
-
createField
-
createMethod
-
createConstructor
-
createTypeParameters
-
addTypeArguments
-
applyTypeArguments
-
createMethodBody
private BlockStatement createMethodBody(MethodDefinition method, Iterable<ParameterDeclaration> parameters) -
makePrimitive
-
makeDefaultValue
-
generateCode
-
isMemberHidden
-
findLocalType
-
createAnnotation
-
createAnnotationElement
-