Class MethodPrototype
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.types.MethodPrototype
- All Implemented Interfaces:
TypeUsageCollectable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<JavaTypeInstance> private final ClassFileprivate MethodPrototypeprivate final List<JavaTypeInstance> private Stringprivate final List<FormalTypeParameter> private booleanprivate final booleanprivate final Stringprivate final Stringprivate List<MethodPrototype.ParameterLValue> private JavaTypeInstanceprivate final booleanprivate 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) voidcollectTypeUsages(TypeUsageCollector collector) computeParameters(Method.MethodConstructor constructorFlag, Map<Integer, Ident> slotToIdentMap) voiddumpAppropriatelyCastedArgumentString(Expression expression, Dumper d) voiddumpDeclarationSignature(Dumper d, String methName, Method.MethodConstructor isConstructor, MethodPrototypeAnnotationsHelper annotationsHelper, List<AnnotationTableTypeEntry> returnTypeAnnotations) booleanequalsGeneric(MethodPrototype other) booleanequalsGeneric(MethodPrototype other, GenericTypeBinder genericTypeBinder) booleanequalsMatch(MethodPrototype other) getAppropriatelyCastedArgument(Expression expression, int argidx) getArgs()getName()private JavaTypeInstancegetResultBoundAccordingly(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) private JavaTypeInstancegetResultBoundAccordinglyInner(JavaTypeInstance result, JavaGenericRefTypeInstance boundInstance, List<Expression> invokingArgs) getReturnType(JavaTypeInstance thisTypeInstance, List<Expression> invokingArgs) private List<JavaTypeInstance> getTypeBinderFor(List<Expression> invokingArgs) getTypeBinderForTypes(List<JavaTypeInstance> invokingArgTypes) intbooleanbooleanvoidhide(int idx) private static booleanbooleanisHiddenArg(int x) booleanbooleanbooleanbooleanprivate static booleansatisfies(List<JavaTypeInstance> haystack, int start, List<JavaTypeInstance> args) private static booleansatisfiesSlots(List<Slot> haystack, int start, List<JavaTypeInstance> args) voidsetDescriptorProto(MethodPrototype descriptorProto) voidsetFixedName(String name) voidvoidvoidsetNonMethodScopedSyntheticConstructorParameters(Method.MethodConstructor constructorFlag, DecompilerComments comments, Map<Integer, JavaTypeInstance> synthetics) voidtightenArgs(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:
collectTypeUsagesin 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
-