Class ClassFile
java.lang.Object
org.benf.cfr.reader.entities.ClassFile
- All Implemented Interfaces:
Dumpable, TypeUsageCollectable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<AccessFlag> private List<ConstructorInvokationAnonymousInner> private final AttributeMapprivate booleanprivate BindingSuperContainerprivate ClassFileVersionprivate final ClassSignatureprivate final ConstantPoolprivate DecompilerCommentsprivate ClassFileDumperprivate FakeMethodsprivate final List<ClassFileField> private Map<String, Map<JavaTypeInstance, ClassFileField>> private booleanprivate final Map<JavaTypeInstance, Pair<InnerClassAttributeInfo, ClassFile>> private final booleanprivate List<ConstructorInvokationSimple> private static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate final List<ConstantPoolEntryClass> private final ConstantPoolEntryClassprivate final ConstantPoolEntryClassprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComment(String comment) private voidaddComment(String comment, Exception e) voidaddComment(DecompilerComment comment) addFakeMethod(Object key, String nameHint, UnaryFunction<String, FakeMethod> methodFactory) private voidprivate voidanalyseMid(DCCommonState state) private voidprivate voidprivate voidanalyseSyntheticTags(Method method, Options options) voidanalyseTop(DCCommonState dcCommonState, TypeUsageCollectingDumper typeUsageCollectingDumper) private voidprivate voidcheckInnerClassAssumption(AttributeInnerClasses attributeInnerClasses, JavaRefTypeInstance typeInstance, DCCommonState state) private voidcollectMethods(MethodPrototype prototype, List<Method> tgt, Set<JavaTypeInstance> seen) private voidcollectTypeMethods(MethodPrototype prototype, List<Method> tgt, Set<JavaTypeInstance> seen, JavaTypeInstance clazz) voidcollectTypeUsages(TypeUsageCollector collector) voidvoidvoidvoiddumpReceiverClassIdentity(List<AnnotationTableTypeEntry> recieverAnnotations, Dumper d) private voidprivate voidprivate voidprivate BindingSuperContainerprivate MethodgetAccessibleMethodByPrototype(MethodPrototype prototype, GenericTypeBinder binder, JavaRefTypeInstance accessor) private voidstatic JavaTypeInstancegetAnonymousTypeBase(ClassFile classFile) private voidgetBoundSuperClasses(JavaTypeInstance boundGeneric, BoundSuperCollector boundSuperCollector, BindingSuperContainer.Route route, Set<JavaTypeInstance> seen) private voidgetBoundSuperClasses2(JavaTypeInstance base, GenericTypeBinder genericTypeBinder, BoundSuperCollector boundSuperCollector, BindingSuperContainer.Route route, Set<JavaTypeInstance> seen) getFieldByName(String name, JavaTypeInstance type) private static voidgetFormalParametersText(ClassSignature signature, TypeAnnotationHelper ah, UnaryFunction<Integer, Predicate<AnnotationTableTypeEntry>> typeAnnPredicateFact, UnaryFunction<Integer, Predicate<AnnotationTableTypeEntry>> typeBoundAnnPredicateFact, Dumper d) getGenericTypeBinder(JavaGenericRefTypeInstance boundGeneric) private List<InnerClassAttributeInfo> getMethodByName(String name) getMethodByPrototype(MethodPrototype prototype) getMethodByPrototypeOrNull(MethodPrototype prototype) getMethodsByNameOrNull(String name) getMethodsWithMatchingName(MethodPrototype prototype) getOverloadMethodSet(MethodPrototype prototype) private OverloadMethodSetgetOverloadMethodSetInner(MethodPrototype prototype) private ClassSignaturegetSignature(ConstantPool cp, ConstantPoolEntryClass rawSuperClass, List<ConstantPoolEntryClass> rawInterfaces) booleanhasAccessibleField(String name, JavaRefTypeInstance maybeCaller) booleanbooleanhasLocalField(String name) private booleanisInferredAnonymousStatic(DCCommonState state, JavaTypeInstance thisType, JavaTypeInstance innerType) booleanbooleanvoidloadInnerClasses(DCCommonState dcCommonState) voidvoidnoteAnonymousUse(ConstructorInvokationAnonymousInner anoynmousInner) voidnoteMethodUse(ConstructorInvokationSimple constructorCall) voidprivate voidvoidsetDumpHelper(ClassFileDumper dumpHelper) booleantestAccessFlag(AccessFlag accessFlag) private booleantestIsInnerClass(DCCommonState dcCommonState) toString()
-
Field Details
-
OFFSET_OF_MAGIC
private static final long OFFSET_OF_MAGIC- See Also:
-
OFFSET_OF_MINOR
private static final long OFFSET_OF_MINOR- See Also:
-
OFFSET_OF_MAJOR
private static final long OFFSET_OF_MAJOR- See Also:
-
OFFSET_OF_CONSTANT_POOL_COUNT
private static final long OFFSET_OF_CONSTANT_POOL_COUNT- See Also:
-
OFFSET_OF_CONSTANT_POOL
private static final long OFFSET_OF_CONSTANT_POOL- See Also:
-
constantPool
-
accessFlags
-
fields
-
fieldsByName
-
methods
-
fakeMethods
-
methodsByName
-
isInnerClass
private final boolean isInnerClass -
innerClassesByTypeInfo
private final Map<JavaTypeInstance, Pair<InnerClassAttributeInfo, ClassFile>> innerClassesByTypeInfo -
attributes
-
thisClass
-
rawSuperClass
-
rawInterfaces
-
classSignature
-
classFileVersion
-
decompilerComments
-
begunAnalysis
private boolean begunAnalysis -
boundSuperClasses
-
dumpHelper
-
usePath
-
anonymousUsages
-
methodUsages
-
-
Constructor Details
-
ClassFile
-
-
Method Details
-
fixConfusingEnumConstructors
private void fixConfusingEnumConstructors() -
elideScala
private void elideScala() -
checkInnerClassAssumption
private void checkInnerClassAssumption(AttributeInnerClasses attributeInnerClasses, JavaRefTypeInstance typeInstance, DCCommonState state) -
getUsePath
-
isInterface
public boolean isInterface() -
addComment
-
addComment
-
addComment
-
getNullableDecompilerComments
-
ensureDecompilerComments
-
addFakeMethod
public FakeMethod addFakeMethod(Object key, String nameHint, UnaryFunction<String, FakeMethod> methodFactory) -
getAllClassTypes
-
collectTypeUsages
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable
-
getAllClassTypes
-
setDumpHelper
-
markHiddenInnerClass
public void markHiddenInnerClass() -
getClassFileVersion
-
isInnerClass
public boolean isInnerClass() -
getConstantPool
-
testAccessFlag
-
hasFormalTypeParameters
public boolean hasFormalTypeParameters() -
ensureFieldsByName
private void ensureFieldsByName() -
hasLocalField
-
hasAccessibleField
-
getFieldByName
public ClassFileField getFieldByName(String name, JavaTypeInstance type) throws NoSuchFieldException - Throws:
NoSuchFieldException
-
calculateFieldsByName
private void calculateFieldsByName() -
getFields
-
getMethods
-
getMethodsWithMatchingName
-
collectMethods
private void collectMethods(MethodPrototype prototype, List<Method> tgt, Set<JavaTypeInstance> seen) -
collectTypeMethods
private void collectTypeMethods(MethodPrototype prototype, List<Method> tgt, Set<JavaTypeInstance> seen, JavaTypeInstance clazz) -
getOverloadMethodSet
-
getOverloadMethodSetInner
-
getMethodByPrototype
- Throws:
NoSuchMethodException
-
getMethodByPrototypeOrNull
-
getAccessibleMethodByPrototype
private Method getAccessibleMethodByPrototype(MethodPrototype prototype, GenericTypeBinder binder, JavaRefTypeInstance accessor) throws NoSuchMethodException - Throws:
NoSuchMethodException
-
getSingleMethodByNameOrNull
-
getMethodsByNameOrNull
-
getMethodByName
- Throws:
NoSuchMethodException
-
getConstructors
-
getBootstrapMethods
-
getThisClassConstpoolEntry
-
isInferredAnonymousStatic
private boolean isInferredAnonymousStatic(DCCommonState state, JavaTypeInstance thisType, JavaTypeInstance innerType) -
testIsInnerClass
-
loadInnerClasses
-
getInnerClassAttributeInfos
-
analyseInnerClassesPass1
-
analysePassOuterFirst
-
analyseTop
public void analyseTop(DCCommonState dcCommonState, TypeUsageCollectingDumper typeUsageCollectingDumper) -
analyseSyntheticTags
-
analyseOverrides
private void analyseOverrides() -
analyseMid
-
releaseCode
public void releaseCode() -
getClassType
-
getRefClassType
-
getBaseClassType
-
getClassSignature
-
getAccessFlags
-
sanitiseAccessPermissions
private void sanitiseAccessPermissions() -
getSignature
private ClassSignature getSignature(ConstantPool cp, ConstantPoolEntryClass rawSuperClass, List<ConstantPoolEntryClass> rawInterfaces) -
dumpNamedInnerClasses
-
dump
-
dumpAsInlineClass
-
getFilePath
-
toString
-
getFormalParametersText
private static void getFormalParametersText(ClassSignature signature, TypeAnnotationHelper ah, UnaryFunction<Integer, Predicate<AnnotationTableTypeEntry>> typeAnnPredicateFact, UnaryFunction<Integer, Predicate<AnnotationTableTypeEntry>> typeBoundAnnPredicateFact, Dumper d) -
dumpReceiverClassIdentity
-
dumpPermitted
-
dumpClassIdentity
-
getBindingSupers
-
generateBoundSuperClasses
-
getBoundSuperClasses
private void getBoundSuperClasses(JavaTypeInstance boundGeneric, BoundSuperCollector boundSuperCollector, BindingSuperContainer.Route route, Set<JavaTypeInstance> seen) -
getGenericTypeBinder
-
getBoundSuperClasses2
private void getBoundSuperClasses2(JavaTypeInstance base, GenericTypeBinder genericTypeBinder, BoundSuperCollector boundSuperCollector, BindingSuperContainer.Route route, Set<JavaTypeInstance> seen) -
noteAnonymousUse
-
noteMethodUse
-
getAnonymousUsages
-
getMethodUsages
-
getAnonymousTypeBase
-
getAttributes
-
getMethodFakes
-