|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.util.SimplifiedVisitor
proguard.optimize.info.ParameterUsageMarker
public class ParameterUsageMarker
This MemberVisitor counts the parameters and marks the used parameters of the methods that it visits. It also marks the 'this' parameters of methods that have hierarchies.
| Constructor Summary | |
|---|---|
ParameterUsageMarker()
Creates a new ParameterUsageMarker. |
|
ParameterUsageMarker(boolean markThisParameter,
boolean markAllParameters)
Creates a new ParameterUsageMarker that optionally marks all parameters. |
|
| Method Summary | |
|---|---|
static int |
getParameterSize(Method method)
Returns the total size of the parameters. |
static long |
getUsedParameters(Method method)
Returns which parameters are being used. |
static boolean |
isParameterUsed(Method method,
int variableIndex)
Returns whether the given parameter is being used. |
static void |
markParameterUsed(Method method,
int variableIndex)
Marks the given parameter as being used. |
static void |
markUsedParameters(Method method,
long usedParameters)
Marks the given parameters as being used. |
void |
visitAnyAttribute(Clazz clazz,
Attribute attribute)
Visit any type of attribute. |
void |
visitAnyInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
Instruction instruction)
Visits any type of Instruction. |
void |
visitCodeAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute)
|
void |
visitLibraryMethod(LibraryClass libraryClass,
LibraryMethod libraryMethod)
|
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
|
void |
visitVariableInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
VariableInstruction variableInstruction)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface proguard.classfile.visitor.MemberVisitor |
|---|
visitLibraryField, visitProgramField |
| Methods inherited from interface proguard.classfile.instruction.visitor.InstructionVisitor |
|---|
visitBranchInstruction, visitConstantInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction |
| Constructor Detail |
|---|
public ParameterUsageMarker()
public ParameterUsageMarker(boolean markThisParameter,
boolean markAllParameters)
markThisParameter - specifies whether all 'this' parameters should
be marked as being used.markAllParameters - specifies whether all other parameters should
be marked as being used.| Method Detail |
|---|
public void visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
visitProgramMethod in interface MemberVisitorvisitProgramMethod in class SimplifiedVisitor
public void visitLibraryMethod(LibraryClass libraryClass,
LibraryMethod libraryMethod)
visitLibraryMethod in interface MemberVisitorvisitLibraryMethod in class SimplifiedVisitor
public void visitAnyAttribute(Clazz clazz,
Attribute attribute)
SimplifiedVisitor
visitAnyAttribute in class SimplifiedVisitor
public void visitCodeAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute)
visitCodeAttribute in interface AttributeVisitorvisitCodeAttribute in class SimplifiedVisitor
public void visitAnyInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
Instruction instruction)
SimplifiedVisitor
visitAnyInstruction in class SimplifiedVisitor
public void visitVariableInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
VariableInstruction variableInstruction)
visitVariableInstruction in interface InstructionVisitorvisitVariableInstruction in class SimplifiedVisitorpublic static int getParameterSize(Method method)
public static void markParameterUsed(Method method,
int variableIndex)
public static void markUsedParameters(Method method,
long usedParameters)
public static boolean isParameterUsed(Method method,
int variableIndex)
public static long getUsedParameters(Method method)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||