|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.util.SimplifiedVisitor
proguard.optimize.peephole.MethodInliner
public class MethodInliner
This AttributeVisitor inlines short methods or methods that are only invoked once, in the code attributes that it visits.
| Constructor Summary | |
|---|---|
MethodInliner(boolean microEdition,
boolean allowAccessModification,
boolean inlineSingleInvocations)
Creates a new MethodInliner. |
|
MethodInliner(boolean microEdition,
boolean allowAccessModification,
boolean inlineSingleInvocations,
InstructionVisitor extraInlinedInvocationVisitor)
Creates a new MethodInliner. |
|
| Method Summary | |
|---|---|
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 |
visitAnyMember(Clazz Clazz,
Member member)
Visits any type of class member of the given class. |
void |
visitCodeAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute)
|
void |
visitConstantInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
ConstantInstruction constantInstruction)
|
void |
visitInterfaceMethodrefConstant(Clazz clazz,
InterfaceMethodrefConstant interfaceMethodrefConstant)
|
void |
visitMethodrefConstant(Clazz clazz,
MethodrefConstant methodrefConstant)
|
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
|
void |
visitSimpleInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
SimpleInstruction simpleInstruction)
|
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.instruction.visitor.InstructionVisitor |
|---|
visitBranchInstruction, visitLookUpSwitchInstruction, visitTableSwitchInstruction |
| Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor |
|---|
visitClassConstant, visitDoubleConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitLongConstant, visitNameAndTypeConstant, visitStringConstant, visitUtf8Constant |
| Methods inherited from interface proguard.classfile.visitor.MemberVisitor |
|---|
visitLibraryField, visitLibraryMethod, visitProgramField |
| Constructor Detail |
|---|
public MethodInliner(boolean microEdition,
boolean allowAccessModification,
boolean inlineSingleInvocations)
microEdition - indicates whether the resulting code is
targeted at Java Micro Edition.allowAccessModification - indicates whether the access modifiers of
classes and class members can be changed
in order to inline methods.inlineSingleInvocations - indicates whether the single invocations
should be inlined, or, alternatively,
short methods.
public MethodInliner(boolean microEdition,
boolean allowAccessModification,
boolean inlineSingleInvocations,
InstructionVisitor extraInlinedInvocationVisitor)
microEdition - indicates whether the resulting code is
targeted at Java Micro Edition.allowAccessModification - indicates whether the access modifiers of
classes and class members can be changed
in order to inline methods.inlineSingleInvocations - indicates whether the single invocations
should be inlined, or, alternatively,
short methods.extraInlinedInvocationVisitor - an optional extra visitor for all
inlined invocation instructions.| Method Detail |
|---|
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 visitSimpleInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
SimpleInstruction simpleInstruction)
visitSimpleInstruction in interface InstructionVisitorvisitSimpleInstruction in class SimplifiedVisitor
public void visitVariableInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
VariableInstruction variableInstruction)
visitVariableInstruction in interface InstructionVisitorvisitVariableInstruction in class SimplifiedVisitor
public void visitConstantInstruction(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
ConstantInstruction constantInstruction)
visitConstantInstruction in interface InstructionVisitorvisitConstantInstruction in class SimplifiedVisitor
public void visitInterfaceMethodrefConstant(Clazz clazz,
InterfaceMethodrefConstant interfaceMethodrefConstant)
visitInterfaceMethodrefConstant in interface ConstantVisitorvisitInterfaceMethodrefConstant in class SimplifiedVisitor
public void visitMethodrefConstant(Clazz clazz,
MethodrefConstant methodrefConstant)
visitMethodrefConstant in interface ConstantVisitorvisitMethodrefConstant in class SimplifiedVisitor
public void visitAnyMember(Clazz Clazz,
Member member)
SimplifiedVisitor
visitAnyMember in class SimplifiedVisitor
public void visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
visitProgramMethod in interface MemberVisitorvisitProgramMethod in class SimplifiedVisitor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||