Class MethodPrototype
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.types.MethodPrototype
- All Implemented Interfaces:
TypeUsageCollectable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<JavaTypeInstance>
private final ClassFile
private MethodPrototype
private final List<JavaTypeInstance>
private String
private final List<FormalTypeParameter>
private boolean
private final boolean
private final String
private final String
private List<MethodPrototype.ParameterLValue>
private JavaTypeInstance
private final boolean
private final VariableNamer
-
Constructor Summary
ConstructorsConstructorDescriptionMethodPrototype
(DCCommonState state, ClassFile classFile, JavaTypeInstance classType, String name, boolean instanceMethod, Method.MethodConstructor constructorFlag, List<FormalTypeParameter> formalTypeParameters, List<JavaTypeInstance> args, JavaTypeInstance result, List<JavaTypeInstance> exceptionTypes, boolean varargs, VariableNamer variableNamer, boolean synthetic, String originalDescriptor) -
Method Summary
Modifier and TypeMethodDescriptioncollectInitialSlotUsage
(SSAIdentifierFactory<Slot, ?> ssaIdentifierFactory) void
collectTypeUsages
(TypeUsageCollector collector) computeParameters
(Method.MethodConstructor constructorFlag, Map<Integer, Ident> slotToIdentMap) void
dumpAppropriatelyCastedArgumentString
(Expression expression, Dumper d) void
dumpDeclarationSignature
(Dumper d, String methName, Method.MethodConstructor isConstructor, MethodPrototypeAnnotationsHelper annotationsHelper, List<AnnotationTableTypeEntry> returnTypeAnnotations) boolean
equalsGeneric
(MethodPrototype other) boolean
equalsGeneric
(MethodPrototype other, GenericTypeBinder genericTypeBinder) boolean
equalsMatch
(MethodPrototype other) getAppropriatelyCastedArgument
(Expression expression, int argidx) getArgs()
getName()
private JavaTypeInstance
getResultBoundAccordingly
(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) private JavaTypeInstance
getResultBoundAccordinglyInner
(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) getReturnType
(JavaTypeInstance thisTypeInstance, List<Expression> invokingArgs) private List<JavaTypeInstance>
getTypeBinderFor
(List<Expression> invokingArgs) getTypeBinderForTypes
(List<JavaTypeInstance> invokingArgTypes) int
boolean
boolean
void
hide
(int idx) private static boolean
boolean
isHiddenArg
(int x) boolean
boolean
boolean
boolean
private static boolean
satisfies
(List<JavaTypeInstance> haystack, int start, List<JavaTypeInstance> args) private static boolean
satisfiesSlots
(List<Slot> haystack, int start, List<JavaTypeInstance> args) void
setDescriptorProto
(MethodPrototype descriptorProto) void
setFixedName
(String name) void
void
void
setNonMethodScopedSyntheticConstructorParameters
(Method.MethodConstructor constructorFlag, DecompilerComments comments, Map<Integer, JavaTypeInstance> synthetics) void
tightenArgs
(Expression object, List<Expression> expressions) toString()
void
-
Field Details
-
descriptorProto
-
originalDescriptor
-
formalTypeParameters
-
args
-
exceptionTypes
-
innerOuterThis
private boolean innerOuterThis -
result
-
variableNamer
-
instanceMethod
private final boolean instanceMethod -
varargs
private final boolean varargs -
name
-
fixedName
-
classFile
-
syntheticArgs
-
syntheticCaptureArgs
-
parameterLValues
-
-
Constructor Details
-
MethodPrototype
public MethodPrototype(DCCommonState state, ClassFile classFile, JavaTypeInstance classType, String name, boolean instanceMethod, Method.MethodConstructor constructorFlag, List<FormalTypeParameter> formalTypeParameters, List<JavaTypeInstance> args, JavaTypeInstance result, List<JavaTypeInstance> exceptionTypes, boolean varargs, VariableNamer variableNamer, boolean synthetic, String originalDescriptor)
-
-
Method Details
-
getOverloadMethodSet
-
unbreakEnumConstructor
public void unbreakEnumConstructor() -
collectTypeUsages
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
-
hide
public void hide(int idx) -
getFormalParameterMap
-
setDescriptorProto
-
setInnerOuterThis
public void setInnerOuterThis() -
isHiddenArg
public boolean isHiddenArg(int x) -
isInnerOuterThis
public boolean isInnerOuterThis() -
dumpDeclarationSignature
public void dumpDeclarationSignature(Dumper d, String methName, Method.MethodConstructor isConstructor, MethodPrototypeAnnotationsHelper annotationsHelper, List<AnnotationTableTypeEntry> returnTypeAnnotations) -
parametersComputed
public boolean parametersComputed() -
getParameterLValues
-
getComputedParameters
-
setNonMethodScopedSyntheticConstructorParameters
public void setNonMethodScopedSyntheticConstructorParameters(Method.MethodConstructor constructorFlag, DecompilerComments comments, Map<Integer, JavaTypeInstance> synthetics) -
collectInitialSlotUsage
public Map<Slot,SSAIdent> collectInitialSlotUsage(SSAIdentifierFactory<Slot, ?> ssaIdentifierFactory) -
computeParameters
public List<LocalVariable> computeParameters(Method.MethodConstructor constructorFlag, Map<Integer, Ident> slotToIdentMap) -
getReturnType
-
getName
-
getFixedName
-
hasNameBeenFixed
public boolean hasNameBeenFixed() -
setFixedName
-
hasFormalTypeParameters
public boolean hasFormalTypeParameters() -
getExplicitGenericUsage
-
getClassType
-
getReturnType
public JavaTypeInstance getReturnType(JavaTypeInstance thisTypeInstance, List<Expression> invokingArgs) -
getArgs
-
getSignatureBoundArgs
-
getExceptionTypes
-
getSignatureBoundExceptions
-
getSignatureBoundTypes
-
getVisibleArgCount
public int getVisibleArgCount() -
isInstanceMethod
public boolean isInstanceMethod() -
getAppropriatelyCastedArgument
-
dumpAppropriatelyCastedArgumentString
-
tightenArgs
-
isGenericArg
-
getComparableString
-
toString
-
equalsGeneric
-
equalsGeneric
-
getTypeBinderForTypes
-
getTypeBinderFor
-
getResultBoundAccordingly
private JavaTypeInstance getResultBoundAccordingly(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) -
getResultBoundAccordinglyInner
private JavaTypeInstance getResultBoundAccordinglyInner(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) -
isVarArgs
public boolean isVarArgs() -
equalsMatch
-
satisfies
private static boolean satisfies(List<JavaTypeInstance> haystack, int start, List<JavaTypeInstance> args) -
satisfiesSlots
-
getOriginalDescriptor
-