public class Method extends java.lang.Object implements KnowsRawSize, TypeUsageCollectable
Modifier and Type | Class and Description |
---|---|
static class |
Method.MethodConstructor |
static class |
Method.Visibility |
Modifier and Type | Field and Description |
---|---|
private java.util.EnumSet<AccessFlagMethod> |
accessFlags |
private AttributeMap |
attributes |
private ClassFile |
classFile |
private AttributeCode |
codeAttribute |
private DecompilerComments |
comments |
private ConstantPool |
cp |
private int |
descriptorIndex |
private Method.Visibility |
hidden |
private Method.MethodConstructor |
isConstructor |
private boolean |
isOverride |
private long |
length |
private java.util.Map<JavaRefTypeInstance,java.lang.String> |
localClasses |
private MethodPrototype |
methodPrototype |
private static long |
OFFSET_OF_ACCESS_FLAGS |
private static long |
OFFSET_OF_ATTRIBUTES |
private static long |
OFFSET_OF_ATTRIBUTES_COUNT |
private static long |
OFFSET_OF_DESCRIPTOR_INDEX |
private static long |
OFFSET_OF_NAME_INDEX |
private static AnnotationTableEntry |
OVERRIDE_ANNOTATION |
private java.util.Set<JavaTypeInstance> |
thrownTypes |
private VariableNamer |
variableNamer |
Constructor and Description |
---|
Method(ByteData raw,
ClassFile classFile,
ConstantPool cp,
DCCommonState dcCommonState,
ClassFileVersion classFileVersion) |
private static final long OFFSET_OF_ACCESS_FLAGS
private static final long OFFSET_OF_NAME_INDEX
private static final long OFFSET_OF_DESCRIPTOR_INDEX
private static final long OFFSET_OF_ATTRIBUTES_COUNT
private static final long OFFSET_OF_ATTRIBUTES
private static final AnnotationTableEntry OVERRIDE_ANNOTATION
private final long length
private final java.util.EnumSet<AccessFlagMethod> accessFlags
private final AttributeMap attributes
private Method.MethodConstructor isConstructor
private final int descriptorIndex
private final AttributeCode codeAttribute
private final ConstantPool cp
private final VariableNamer variableNamer
private final MethodPrototype methodPrototype
private final ClassFile classFile
private Method.Visibility hidden
private DecompilerComments comments
private final java.util.Map<JavaRefTypeInstance,java.lang.String> localClasses
private boolean isOverride
private transient java.util.Set<JavaTypeInstance> thrownTypes
public Method(ByteData raw, ClassFile classFile, ConstantPool cp, DCCommonState dcCommonState, ClassFileVersion classFileVersion)
void releaseCode()
public boolean hasDumpableAttributes()
public void collectTypeUsages(TypeUsageCollector collector)
collectTypeUsages
in interface TypeUsageCollectable
public boolean copyLocalClassesFrom(Method other)
public java.util.Set<AccessFlagMethod> getAccessFlags()
public void hideSynthetic()
public void hideDead()
public Method.Visibility hiddenState()
public boolean testAccessFlag(AccessFlagMethod flag)
public Method.MethodConstructor getConstructorFlag()
public void setConstructorFlag(Method.MethodConstructor flag)
AttributeSignature getSignatureAttribute()
public VariableNamer getVariableNamer()
public ClassFile getClassFile()
public long getRawByteLength()
getRawByteLength
in interface KnowsRawSize
public java.lang.String getName()
private MethodPrototype generateMethodPrototype(Options options, java.lang.String initialName, Method.MethodConstructor constructorFlag)
private static boolean checkSigProto(MethodPrototype desproto, MethodPrototype sigproto, boolean isEnumConstructor, boolean isInnerConstructor)
private static void fixupInnerClassSignature(MethodPrototype descriptor, MethodPrototype signature)
public MethodPrototype getMethodPrototype()
void markOverride()
public void markUsedLocalClassType(JavaTypeInstance javaTypeInstance, java.lang.String suggestedName)
public void markUsedLocalClassType(JavaTypeInstance javaTypeInstance)
private void dumpMethodAnnotations(Dumper d, java.util.List<AnnotationTableEntry> nullableDeclAnnotations)
private java.util.List<JavaTypeInstance> getDeclaredThrownTypes()
private java.util.List<JavaTypeInstance> getAttributeDeclaredThrownTypes()
public java.util.Set<JavaTypeInstance> getThrownTypes()
private void dumpSignatureText(boolean asClass, Dumper d)
public Op04StructuredStatement getAnalysis()
public boolean isConstructor()
void analyse()
public boolean hasCodeAttribute()
public AttributeCode getCodeAttribute()
private void dumpComments(Dumper d)
public void setComments(DecompilerComments comments)
private void addComment(DecompilerComment comment)
public boolean isVisibleTo(JavaRefTypeInstance maybeCaller)
public void dump(Dumper d, boolean asClass)
public java.lang.String toString()
toString
in class java.lang.Object