Interface Variable
-
Method Summary
Modifier and TypeMethodDescriptionAdd this variable with another variable or a constant, and assign the result to a new variable.addAnnotation
(Object annotationType, boolean visible) Add an annotation to this variable.Access an element from this array.alength()
Access the length of this array.Compute the bitwise and of this variable with another variable or a constant, and assign the result to a new variable.void
Set an element into this array.box()
Box this primitive variable into its object peer.Class
<?> Returns a boxed object type for this variable.static Class
<?> Returns a boxed object type for the given type.Cast this variable to another type, and assign the result to a new variable.default Class
<?> Returns the type of this variable, if bound to an existing class.clear()
Assign a value of 0, false, or null to this variable, depending on its type.com()
Compute the bitwise complement of this variable and assign the result to a new variable.Specify a static bootstrap method for dynamically generating constants, as found in the class type of this variable.void
Decrement this variable with another variable or a constant, and assign the result back to this variable.Divide this variable with another variable or a constant, and assign the result to a new variable.Determine if this variable is equal to another variable or constant, and assign the result to a new boolean variable.Access a static or instance field from the object referred to by this variable.Determine if this variable is greater than or equal to another variable or constant, and assign the result to a new boolean variable.get()
Return a new variable with the same type and value as this one.Determine if this variable is greater than another variable or constant, and assign the result to a new boolean variable.default void
Convenience method to generate conditional code if this variable is equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is equal to another variable or constant.void
Conditional goto if this variable is equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is false.default void
Convenience method to generate conditional code if this variable is false.void
Conditional goto if this variable is false.default void
Convenience method to generate conditional code if this variable is greater than or equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is greater than or equal to another variable or constant.void
Conditional goto if this variable is greater than or equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is greater than another variable or constant.default void
Convenience method to generate conditional code if this variable is greater than another variable or constant.void
Conditional goto if this variable is greater than another variable or constant.default void
Convenience method to generate conditional code if this variable is less than or equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is less than or equal to another variable or constant.void
Conditional goto if this variable is less than or equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is less than another variable or constant.default void
Convenience method to generate conditional code if this variable is less than another variable or constant.void
Conditional goto if this variable is less than another variable or constant.default void
Convenience method to generate conditional code if this variable is not equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is not equal to another variable or constant.void
Conditional goto if this variable is not equal to another variable or constant.default void
Convenience method to generate conditional code if this variable is true.default void
Convenience method to generate conditional code if this variable is true.void
Conditional goto if this variable is true.void
Increment this variable with another variable or a constant, and assign the result back to this variable.Specify a static bootstrap method for dynamically generating methods, as found in the class type of this variable.instanceOf
(Object type) Determine if this variable is an instance of the given class or interface, and assign the result to a new boolean variable.Invoke a static or instance method on the object referenced by this variable.Invoke a static or instance method on the object referenced by this variable.Determine if this variable is less than or equal to another variable or constant, and assign the result to a new boolean variable.Determine if this variable is less than another variable or constant, and assign the result to a new boolean variable.Returns the type of this variable, if bound to a class which is being made.methodHandle
(Object returnType, String name, Object... types) Returns aMethodHandle
variable which can invoke a static or instance method on the object referenced by this variable.Returns theMethodMaker
that this variable belongs to.void
Enter a synchronized block on this variable.void
Exit a synchronized block on this variable.Multiply this variable with another variable or a constant, and assign the result to a new variable.name()
Returns the name of this variable, which is null if unnamed.Optionally assign a variable name.Determine if this variable is not equal to another variable or constant, and assign the result to a new boolean variable.neg()
Negate the value of this variable and assign the result to a new variable.not()
Compute the logical negation of this boolean variable, and assign the result to a new variable.Compute the bitwise or of this variable with another variable or a constant, and assign the result to a new variable.Compute the division remainder of this variable with another variable or a constant, and assign the result to a new variable.Assign a value to this variable, either from another variable or from a constant.Assign an exact object instance to this variable, supported only when the class is built dynamically instead of loaded from a file.Compute the bitwise left shift of this variable with another variable or a constant, and assign the result to a new variable.Compute the bitwise right shift of this variable with another variable or a constant, and assign the result to a new variable.Define a signature for this named variable, which is a string for supporting generic types.Subtract this variable with another variable or a constant, and assign the result to a new variable.void
Generates a switch statement against thisint
or non-nullInteger
variable.void
Generates a switch statement against this non-nullEnum
variable.void
Generates a switch statement against this non-null variable, of any type.void
Generates a switch statement against this non-nullString
variable.void
synchronized_
(Runnable body) Convenience method for defining a synchronized block on this variable.void
throw_()
Throw the exception object referred to by this variable.type()
Returns the type of this variable.unbox()
Unbox this object variable into its primitive peer.Class
<?> Returns an unboxed primitive type for this variable.static Class
<?> unboxedType
(Class<?> clazz) Returns an unboxed primitive type for the given type.Compute the bitwise unsigned right shift of this variable with another variable or a constant, and assign the result to a new variable.Compute the bitwise xor of this variable with another variable or a constant, and assign the result to a new variable.
-
Method Details
-
type
Type type()Returns the type of this variable. -
classType
Returns the type of this variable, if bound to an existing class. Null is returned if bound to a class which is being made. -
makerType
ClassMaker makerType()Returns the type of this variable, if bound to a class which is being made. Null is returned if bound to an existing class. -
name
String name()Returns the name of this variable, which is null if unnamed. -
name
Optionally assign a variable name.- Returns:
- this variable
- Throws:
IllegalStateException
- if already named
-
signature
Define a signature for this named variable, which is a string for supporting generic types. The components can be strings or types (class, ClassMaker, etc.), which are concatenated into a single string. Consult the JVM specification for the signature syntax.- Returns:
- this
- Throws:
IllegalArgumentException
- if given an unsupported componentIllegalStateException
- if this isn't a plain local variable
-
addAnnotation
Add an annotation to this variable.- Parameters:
annotationType
- name or class which refers to an annotation interfacevisible
- true if annotation is visible at runtime- Throws:
IllegalArgumentException
- if the annotation type is unsupportedIllegalStateException
- if this variable doesn't support annotations
-
clear
Variable clear()Assign a value of 0, false, or null to this variable, depending on its type.- Returns:
- this variable
- Throws:
IllegalStateException
- if this variable cannot be modified
-
set
Assign a value to this variable, either from another variable or from a constant. A constant value can be a primitive type (boxed or unboxed),null
, aString
, aClass
, anEnum
, aMethodType
, aMethodHandleInfo
, aConstantDesc
, or aConstable
.Note that a
MethodHandle
can be set with aMethodHandleInfo
, which is converted automatically at link time. Handling ofConstantDesc
andConstable
is also treated specially — the actual type is determined by the resolved constant.- Parameters:
value
- aVariable
or a constant- Returns:
- this variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable cannot be modified, or if it's not compatible with the value type
-
setExact
Assign an exact object instance to this variable, supported only when the class is built dynamically instead of loaded from a file. At runtime, the object instance provided here is exactly the same as referenced by the generated class. For simple constants, the regular set method is preferred.- Parameters:
value
- exact object instance to assign- Returns:
- this variable
- Throws:
IllegalStateException
- if this variable cannot be modified, or if it's not compatible with the value type, or if the class being made isexternal
-
get
Variable get()Return a new variable with the same type and value as this one.- Returns:
- the result in a new variable, with the same type as this one
-
ifTrue
Conditional goto if this variable is true. The label doesn't need to be positioned yet. -
ifTrue
Convenience method to generate conditional code if this variable is true.- Parameters:
then
- called to generate the body of the "then" case
-
ifTrue
-
ifFalse
Conditional goto if this variable is false. The label doesn't need to be positioned yet. -
ifFalse
Convenience method to generate conditional code if this variable is false.- Parameters:
then
- called to generate the body of the "then" case
-
ifFalse
-
ifEq
Conditional goto if this variable is equal to another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifEq
Convenience method to generate conditional code if this variable is equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifEq
Convenience method to generate conditional code if this variable is equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifNe
Conditional goto if this variable is not equal to another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifNe
Convenience method to generate conditional code if this variable is not equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifNe
Convenience method to generate conditional code if this variable is not equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLt
Conditional goto if this variable is less than another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLt
Convenience method to generate conditional code if this variable is less than another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLt
Convenience method to generate conditional code if this variable is less than another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGe
Conditional goto if this variable is greater than or equal to another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGe
Convenience method to generate conditional code if this variable is greater than or equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGe
Convenience method to generate conditional code if this variable is greater than or equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGt
Conditional goto if this variable is greater than another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGt
Convenience method to generate conditional code if this variable is greater than another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifGt
Convenience method to generate conditional code if this variable is greater than another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLe
Conditional goto if this variable is less than or equal to another variable or constant. The label doesn't need to be positioned yet.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLe
Convenience method to generate conditional code if this variable is less than or equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
ifLe
Convenience method to generate conditional code if this variable is less than or equal to another variable or constant.- Parameters:
value
- aVariable
or a constantthen
- called to generate the body of the "then" caseelse_
- called to generate the body of the "else" case- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant
-
switch_
Generates a switch statement against thisint
or non-nullInteger
variable. None of the labels need to be positioned yet.- Parameters:
defaultLabel
- required- Throws:
IllegalArgumentException
- if the number of cases and labels don't matchIllegalStateException
- if this variable cannot be automatically cast to an int
-
switch_
Generates a switch statement against this non-nullString
variable. None of the labels need to be positioned yet.- Parameters:
defaultLabel
- required- Throws:
IllegalArgumentException
- if the number of cases and labels don't matchIllegalStateException
- if this variable isn't a String
-
switch_
Generates a switch statement against this non-nullEnum
variable. None of the labels need to be positioned yet.- Parameters:
defaultLabel
- required- Throws:
IllegalArgumentException
- if the number of cases and labels don't match, or if a case type doesn't match this variable's typeIllegalStateException
- if this variable isn't an Enum
-
switch_
Generates a switch statement against this non-null variable, of any type. None of the labels need to be positioned yet. The switch implementation assumes that this variable's type and all the cases have validhashCode
andequals
methods defined.Any of the cases can be
Variable
instances, as long as they are constants. Such constants are generally provided by acondy
method.- Parameters:
defaultLabel
- required- Throws:
IllegalArgumentException
- if the number of cases and labels don't match, or if a case type isn't supportedIllegalStateException
- if the class being made isexternal
-
inc
Increment this variable with another variable or a constant, and assign the result back to this variable.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
dec
Decrement this variable with another variable or a constant, and assign the result back to this variable.- Parameters:
value
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
add
Add this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
sub
Subtract this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
mul
Multiply this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
div
Divide this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
rem
Compute the division remainder of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
eq
Determine if this variable is equal to another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
ne
Determine if this variable is not equal to another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
lt
Determine if this variable is less than another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
ge
Determine if this variable is greater than or equal to another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
gt
Determine if this variable is greater than another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
le
Determine if this variable is less than or equal to another variable or constant, and assign the result to a new boolean variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constant- See Also:
-
instanceOf
Determine if this variable is an instance of the given class or interface, and assign the result to a new boolean variable.- Parameters:
type
- class or interface- Returns:
- the result in a new boolean variable
- Throws:
IllegalArgumentException
- if the type is unsupported
-
cast
Cast this variable to another type, and assign the result to a new variable. If the variable represents a primitive type, a conversion might be applied.- Parameters:
type
- class or interface- Returns:
- the result in a new variable
- Throws:
IllegalArgumentException
- if the type is unsupported
-
not
Variable not()Compute the logical negation of this boolean variable, and assign the result to a new variable.- Returns:
- the result in a new variable, with the same type as this one
-
and
Compute the bitwise and of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
or
Compute the bitwise or of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
xor
Compute the bitwise xor of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
shl
Compute the bitwise left shift of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
shr
Compute the bitwise right shift of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
ushr
Compute the bitwise unsigned right shift of this variable with another variable or a constant, and assign the result to a new variable.- Parameters:
value
- aVariable
or a constant- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalArgumentException
- if the value isn't a variable or a supported constantIllegalStateException
- if this variable doesn't support the operation, or if the value is incompatible
-
neg
Variable neg()Negate the value of this variable and assign the result to a new variable.- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalStateException
- if this variable doesn't support the operation
-
com
Variable com()Compute the bitwise complement of this variable and assign the result to a new variable.- Returns:
- the result in a new variable, with the same type as this one
- Throws:
IllegalStateException
- if this variable doesn't support the operation
-
box
-
unbox
Variable unbox()Unbox this object variable into its primitive peer. If already a primitive type, then this is equivalent to callingget
.- Returns:
- the result in a new variable
- Throws:
IllegalStateException
- if this variable cannot be unboxed
-
boxedType
Class<?> boxedType()Returns a boxed object type for this variable. If the type already represents a boxed primitive type, it's simply returned as is. Null is returned in all other cases.- See Also:
-
boxedType
-
unboxedType
Class<?> unboxedType()Returns an unboxed primitive type for this variable. If the type is already primitive, it's simply returned as is. Null is returned in all other cases.- See Also:
-
unboxedType
-
alength
Variable alength()Access the length of this array.- Returns:
- the result in a new int variable
- Throws:
IllegalStateException
- if this variable isn't an array type
-
aget
Access an element from this array.- Parameters:
index
- aVariable
or a constant- Returns:
- the result in a new variable
- Throws:
IllegalArgumentException
- if the index isn't a variable or a supported constantIllegalStateException
- if this variable isn't an array type
-
aset
Set an element into this array.- Parameters:
index
- aVariable
or a constantvalue
- aVariable
or a constant- Throws:
IllegalArgumentException
- if the index or value isn't a variable or a supported constantIllegalStateException
- if this variable isn't an array type- See Also:
-
field
Access a static or instance field from the object referred to by this variable.- Parameters:
name
- field name- Throws:
IllegalStateException
- if the field isn't found
-
invoke
Invoke a static or instance method on the object referenced by this variable.- Parameters:
name
- method namevalues
-Variables
or constants- Returns:
- the result of the method, which is null if void
- Throws:
IllegalArgumentException
- if a value isn't a variable or a supported constantIllegalStateException
- if the method isn't found
-
invoke
Invoke a static or instance method on the object referenced by this variable.- Parameters:
returnType
- method return typename
- method name; can be".new"
to construct an instance of this variable type, and returnType can be nulltypes
- method parameter types; the entire array or individual elements can be null to infer the actual type from the corresponding valuevalues
-Variables
or constants- Returns:
- the result of the method, which is null if void
- Throws:
IllegalArgumentException
- if a type is unsupported, or if a value isn't a variable or a supported constantIllegalStateException
- if the method isn't found
-
methodHandle
Returns aMethodHandle
variable which can invoke a static or instance method on the object referenced by this variable. The returned variable is actually a constant, and so it can be supplied as an argument to abootstrap
method or be used by another method in the same class.- Parameters:
returnType
- method return typename
- method name; can be".new"
to construct an instance of this variable type, and returnType can be nulltypes
- method parameter types; can be null if none- Throws:
IllegalArgumentException
- if a type is unsupportedIllegalStateException
- if the method isn't found
-
indy
Specify a static bootstrap method for dynamically generating methods, as found in the class type of this variable.- Parameters:
name
- bootstrap method nameargs
- constants which are passed to the bootstrap method, not including the first three standard arguments:(Lookup caller, String name, MethodType type)
- Throws:
IllegalArgumentException
- if an argument isn't a supported constant- See Also:
-
condy
Specify a static bootstrap method for dynamically generating constants, as found in the class type of this variable. The variable returned by the bootstrap method cannot be modified. Since it is a constant, it can be supplied as an argument to another bootstrap method or be used by another method in the same class.- Parameters:
name
- bootstrap method nameargs
- constants which are passed to the bootstrap method, not including the first three standard arguments:(Lookup caller, String name, Class type)
- Throws:
IllegalArgumentException
- if an argument isn't a supported constant- See Also:
-
throw_
void throw_()Throw the exception object referred to by this variable.- Throws:
IllegalStateException
- if this variable isn't an exception type
-
monitorEnter
void monitorEnter()Enter a synchronized block on this variable.- Throws:
IllegalStateException
- if this variable isn't an object type
-
monitorExit
void monitorExit()Exit a synchronized block on this variable.- Throws:
IllegalStateException
- if this variable isn't an object type
-
synchronized_
Convenience method for defining a synchronized block on this variable.- Parameters:
body
- called to generate the body of the synchronized block- Throws:
IllegalStateException
- if this variable isn't an object type
-
methodMaker
MethodMaker methodMaker()Returns theMethodMaker
that this variable belongs to.
-