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