Package com.strobel.assembler.metadata
Class MethodBody
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.assembler.metadata.MethodBody
-
- All Implemented Interfaces:
IFreezable
public final class MethodBody extends Freezable
-
-
Field Summary
Fields Modifier and Type Field Description private int
_codeSize
private Collection<ExceptionHandler>
_exceptionHandlers
private InstructionCollection
_instructions
private int
_maxLocals
private int
_maxStackSize
private MethodDefinition
_method
private java.util.List<StackMapFrame>
_stackMapFrames
private ParameterDefinition
_thisParameter
private VariableDefinitionCollection
_variables
-
Constructor Summary
Constructors Constructor Description MethodBody(MethodDefinition methodDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
freezeCore()
int
getCodeSize()
java.util.List<ExceptionHandler>
getExceptionHandlers()
InstructionCollection
getInstructions()
int
getMaxLocals()
int
getMaxStackSize()
MethodDefinition
getMethod()
ParameterDefinition
getParameter(int index)
IMetadataResolver
getResolver()
java.util.List<StackMapFrame>
getStackMapFrames()
ParameterDefinition
getThisParameter()
VariableDefinitionCollection
getVariables()
boolean
hasThis()
(package private) void
setCodeSize(int codeSize)
(package private) void
setMaxLocals(int maxLocals)
(package private) void
setMaxStackSize(int maxStackSize)
(package private) void
setStackMapFrames(java.util.List<StackMapFrame> stackMapFrames)
(package private) void
setThisParameter(ParameterDefinition thisParameter)
-
Methods inherited from class com.strobel.core.Freezable
canFreeze, freeze, freezeIfUnfrozen, isFrozen, tryFreeze, verifyFrozen, verifyNotFrozen
-
-
-
-
Field Detail
-
_method
private final MethodDefinition _method
-
_instructions
private final InstructionCollection _instructions
-
_variables
private final VariableDefinitionCollection _variables
-
_exceptionHandlers
private final Collection<ExceptionHandler> _exceptionHandlers
-
_stackMapFrames
private java.util.List<StackMapFrame> _stackMapFrames
-
_thisParameter
private ParameterDefinition _thisParameter
-
_maxStackSize
private int _maxStackSize
-
_maxLocals
private int _maxLocals
-
_codeSize
private int _codeSize
-
-
Constructor Detail
-
MethodBody
public MethodBody(MethodDefinition methodDefinition)
-
-
Method Detail
-
getResolver
public final IMetadataResolver getResolver()
-
getInstructions
public final InstructionCollection getInstructions()
-
getVariables
public final VariableDefinitionCollection getVariables()
-
getExceptionHandlers
public final java.util.List<ExceptionHandler> getExceptionHandlers()
-
getStackMapFrames
public final java.util.List<StackMapFrame> getStackMapFrames()
-
setStackMapFrames
final void setStackMapFrames(java.util.List<StackMapFrame> stackMapFrames)
-
getMethod
public final MethodDefinition getMethod()
-
hasThis
public final boolean hasThis()
-
getThisParameter
public final ParameterDefinition getThisParameter()
-
getMaxStackSize
public final int getMaxStackSize()
-
getCodeSize
public final int getCodeSize()
-
getMaxLocals
public final int getMaxLocals()
-
setThisParameter
final void setThisParameter(ParameterDefinition thisParameter)
-
setMaxStackSize
final void setMaxStackSize(int maxStackSize)
-
setCodeSize
final void setCodeSize(int codeSize)
-
setMaxLocals
final void setMaxLocals(int maxLocals)
-
freezeCore
protected final void freezeCore()
- Overrides:
freezeCore
in classFreezable
-
getParameter
public final ParameterDefinition getParameter(int index)
-
-