|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.classfile.SubroutineReference
edu.rit.classfile.SubroutineDescription
edu.rit.classfile.SynthesizedSubroutineDescription
edu.rit.classfile.SynthesizedClassInitializerDescription
public class SynthesizedClassInitializerDescription
Class SynthesizedClassInitializerDescription is used to synthesize a subroutine description for some actual class initializer. To synthesize a class initializer:
In the documentation below, the term "described class initializer" means "the synthesized class initializer described by this synthesized class initializer description object."
Constructor Summary | |
---|---|
SynthesizedClassInitializerDescription(SynthesizedClassOrInterfaceDescription theClassDescription)
Construct a new synthesized class initializer description object. |
Method Summary | |
---|---|
void |
addExceptionHandler(Location theStartLocation,
Location theEndLocation,
Location theHandlerLocation,
ClassReference theCatchType)
Add an exception handler to the described class initializer's list of exception handlers. |
void |
addInstruction(Instruction theInstruction)
Adds the given instruction to the described class initializer's list of bytecode instructions. |
void |
increaseMaxLocals(int theMaxLocals)
Increase the described class initializer's max_locals item if necessary. |
void |
increaseMaxStack(int theMaxStack)
Increase the described class initializer's max_stack item if necessary. |
void |
setMaxLocals(int theMaxLocals)
Specify the described class initializer's max_locals item. |
void |
setMaxStack(int theMaxStack)
Specify the described class initializer's max_stack item. |
void |
setStrictfp(boolean isStrictfp)
Specify whether the described class initializer uses strict floating point mode. |
Methods inherited from class edu.rit.classfile.SubroutineDescription |
---|
getCodeLength, getExceptionHandlers, getInstructions, getMaxLocals, getMaxStack, getThrownExceptions, isAbstract, isFinal, isNative, isPackageScoped, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized |
Methods inherited from class edu.rit.classfile.SubroutineReference |
---|
equals, getArgumentTypes, getArgumentWordCount, getClassReference, getMethodDescriptor, getMethodName, getReturnType, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthesizedClassInitializerDescription(SynthesizedClassOrInterfaceDescription theClassDescription) throws ListFullException
theClassDescription
- Class or interface containing this class
initializer.
NullPointerException
- (unchecked exception) Thrown if theClassDescription is null.
ListFullException
- Thrown if theClassDescription's subroutine list is full
(i.e., contains 65535 subroutines).Method Detail |
---|
public void setStrictfp(boolean isStrictfp)
isStrictfp
- True to use strict floating point mode, false not to
use strict floating point mode.public void addInstruction(Instruction theInstruction) throws ListFullException
theInstruction
- Instruction to add.
NullPointerException
- (unchecked exception) Thrown if theInstruction is null.
ListFullException
- Thrown if the requisite constant pool entries could not be added
because the described class initializer's constant pool is full. Also
thrown if adding theInstruction would cause the described
class initializer's code length to exceed the maximum allowed value
(65534 bytes).public void addExceptionHandler(Location theStartLocation, Location theEndLocation, Location theHandlerLocation, ClassReference theCatchType) throws ListFullException
theStartLocation
- Start location. This is the location of the first instruction in the
class initializer's bytecode sequence covered by the exception
handler. (The start location is inclusive.)theEndLocation
- End location. This is the location of the next instruction after the
last instruction in the class initializer's bytecode sequence covered
by the exception handler. (The end location is exclusive.)theHandlerLocation
- Handler location. This is the location of the first instruction in
the exception handler itself.theCatchType
- Catch type. This is a class reference to the exception class caught
by the exception handler. Null means the exception handler catches
all exceptions.
NullPointerException
- (unchecked exception) Thrown if theStartLocation is null,
theEndLocation is null, or theHandlerLocation is
null.
IllegalArgumentException
- (unchecked exception) Thrown if any of the following is true:
ListFullException
- Thrown if the requisite constant pool entries could not be added
because the described class initializer's class's constant pool was
full. Also thrown if the described class initializer's exception
handler list is full (i.e., contains 65535 exception handlers).public void setMaxStack(int theMaxStack) throws OutOfRangeException
theMaxStack
- max_stack value.
OutOfRangeException
- Thrown if theMaxStack is not in the range 0 .. 65535.public void increaseMaxStack(int theMaxStack) throws OutOfRangeException
theMaxStack
- max_stack value.
OutOfRangeException
- Thrown if theMaxStack is not in the range 0 .. 65535.public void setMaxLocals(int theMaxLocals) throws OutOfRangeException
theMaxLocals
- max_locals value.
OutOfRangeException
- Thrown if theMaxLocals is not in the range 0 .. 65535.public void increaseMaxLocals(int theMaxLocals) throws OutOfRangeException
theMaxLocals
- max_locals value.
OutOfRangeException
- Thrown if theMaxLocals is not in the range 0 .. 65535.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |