public class MethodOptimizationInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasNoEscapingParameters |
protected boolean |
hasNoExternalReturnValues |
protected boolean |
hasNoExternalSideEffects |
protected boolean |
hasNoSideEffects |
protected proguard.evaluation.value.Value |
returnValue |
| Constructor and Description |
|---|
MethodOptimizationInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accessesPackageCode()
Returns whether the method body accesses any package visible fields or
methods.
|
boolean |
accessesPrivateCode()
Returns whether the method body accesses any private fields or methods.
|
boolean |
accessesProtectedCode()
Returns whether the method body accesses any protected fields or methods.
|
boolean |
assignsFinalField()
Returns whether the method body assigns any values to final fields.
|
boolean |
branchesBackward()
Returns whether the method body contains any backward branches.
|
boolean |
canBeMadePrivate()
Returns whether the method can be made private.
|
boolean |
catchesExceptions()
Returns whether the method body contains any exception handlers.
|
long |
getEscapedParameters()
Returns a mask with the reference parameters have already escaped to
the heap when entering the method.
|
long |
getEscapingParameters()
Returns a mask with the parameters that escape from the method.
|
int |
getInvocationCount()
Returns the number of times the method is invoked in the known code
base.
|
static MethodOptimizationInfo |
getMethodOptimizationInfo(proguard.classfile.Method method)
Returns the MethodOptimizationInfo instance from the specified chain of
linked methods.
|
long |
getModifiedParameters()
Returns a mask of the reference parameters whose contents are modified
in the method.
|
int |
getParameterSize()
Returns the size that the parameters of the method take up on the stack.
|
proguard.evaluation.value.Value |
getParameterValue(int parameterIndex)
Returns a representation of the specified method parameter, or null
if it is unknown.
|
long |
getReturnedParameters()
Returns a mask of the reference parameters that the method might return.
|
proguard.evaluation.value.Value |
getReturnValue()
Returns a representation of the return value of the method, or null
if it is unknown.
|
long |
getUsedParameters()
Returns a mask with the parameters that the method actually uses.
|
boolean |
hasNoEscapingParameters()
Returns whether the method doesn't have escaping parameters.
|
boolean |
hasNoExternalReturnValues()
Returns whether the method returns external values.
|
boolean |
hasNoExternalSideEffects()
Retruns whether the method has no external side effects.
|
boolean |
hasNoSideEffects()
Specifies that the method has no side effects.
|
boolean |
hasParameterEscaped(int parameterIndex)
Returns whether the specified reference parameter has already escaped
to the heap when entering the method.
|
boolean |
hasSideEffects()
Returns whether the method has side effects.
|
boolean |
hasSynchronizedBlock()
Returns whether the method body contains any synchronization code
('monitorenter' and 'monitorexit').
|
boolean |
hasUnusedParameters()
Returns whether the method has any unused parameters.
|
boolean |
invokesDynamically()
Returns whether the method body invokes any methods with
'invokedynamic'.
|
boolean |
invokesSuperMethods()
Returns whether the method body invokes any super methods.
|
boolean |
isKept()
Returns whether the method is kept.
|
boolean |
isParameterEscaping(int parameterIndex)
Returns whether the specified parameter escapes from the method.
|
boolean |
isParameterModified(int parameterIndex)
Returns whether the contents of the specified reference parameter are
modified in the method.
|
boolean |
isParameterUsed(int variableIndex)
Returns whether the method actually uses the specified parameter.
|
boolean |
modifiesAnything()
Returns whether the method might modify objects that it can reach
through static fields or instance fields.
|
boolean |
returnsExternalValues()
Returns whether the method might return external values.
|
boolean |
returnsNewInstances()
Returns whether the method might create and return new instances.
|
boolean |
returnsParameter(int parameterIndex)
Returns whether the method might return the specified reference
parameter as its result.
|
boolean |
returnsWithNonEmptyStack()
Returns whether the method body contains `return` instructions that
leave a non-empty stack.
|
static void |
setMethodOptimizationInfo(proguard.classfile.Clazz clazz,
proguard.classfile.Method method)
Creates and sets a MethodOptimizationInfo instance on the specified
chain of linked methods.
|
void |
setNoEscapingParameters()
Specifies that the method doesn't have escaping parameters.
|
void |
setNoExternalReturnValues()
Specifies that the method doesn't return external values.
|
void |
setNoExternalSideEffects()
Specifies that the method has no external side effects.
|
void |
setNoSideEffects()
Specifies that the method has no side effects.
|
void |
setReturnValue(proguard.evaluation.value.Value returnValue)
Specifies the return value of the method.
|
protected boolean hasNoSideEffects
protected boolean hasNoExternalSideEffects
protected boolean hasNoEscapingParameters
protected boolean hasNoExternalReturnValues
protected proguard.evaluation.value.Value returnValue
public boolean isKept()
public void setNoSideEffects()
public boolean hasNoSideEffects()
public void setNoExternalSideEffects()
public boolean hasNoExternalSideEffects()
public void setNoEscapingParameters()
public boolean hasNoEscapingParameters()
public void setNoExternalReturnValues()
public boolean hasNoExternalReturnValues()
public void setReturnValue(proguard.evaluation.value.Value returnValue)
public proguard.evaluation.value.Value getReturnValue()
public boolean hasSideEffects()
public boolean canBeMadePrivate()
public boolean catchesExceptions()
public boolean branchesBackward()
public boolean invokesSuperMethods()
public boolean invokesDynamically()
public boolean accessesPrivateCode()
public boolean accessesPackageCode()
public boolean accessesProtectedCode()
public boolean hasSynchronizedBlock()
public boolean assignsFinalField()
public boolean returnsWithNonEmptyStack()
public int getInvocationCount()
public int getParameterSize()
public boolean hasUnusedParameters()
public boolean isParameterUsed(int variableIndex)
public long getUsedParameters()
public boolean hasParameterEscaped(int parameterIndex)
public long getEscapedParameters()
public boolean isParameterEscaping(int parameterIndex)
public long getEscapingParameters()
public boolean isParameterModified(int parameterIndex)
public long getModifiedParameters()
public boolean modifiesAnything()
public proguard.evaluation.value.Value getParameterValue(int parameterIndex)
public boolean returnsParameter(int parameterIndex)
public long getReturnedParameters()
public boolean returnsNewInstances()
public boolean returnsExternalValues()
public static void setMethodOptimizationInfo(proguard.classfile.Clazz clazz,
proguard.classfile.Method method)
public static MethodOptimizationInfo getMethodOptimizationInfo(proguard.classfile.Method method)