Interface Field
- All Superinterfaces:
Variable
-
Method Summary
Modifier and TypeMethodDescriptioncompareAndExchange(Object expectedValue, Object newValue) compareAndExchangeAcquire(Object expectedValue, Object newValue) compareAndExchangeRelease(Object expectedValue, Object newValue) compareAndSet(Object expectedValue, Object newValue) Access the field using acquire mode.getAndAddAcquire(Object value) getAndAddRelease(Object value) getAndBitwiseAnd(Object value) getAndBitwiseAndAcquire(Object value) getAndBitwiseAndRelease(Object value) getAndBitwiseOr(Object value) getAndBitwiseOrAcquire(Object value) getAndBitwiseOrRelease(Object value) getAndBitwiseXor(Object value) getAndBitwiseXorAcquire(Object value) getAndBitwiseXorRelease(Object value) getAndSetAcquire(Object value) getAndSetRelease(Object value) Access the field using opaque mode.getPlain()Access the field using plain mode, ignoring any volatile declaration.Access the field as if it was declared volatile.Returns aMethodHandlevariable for getting the field value.Returns aMethodHandlevariable for setting the field value.default FieldFields cannot be renamed, and so this method always throws anIllegalStateException.Assign a value to this variable, either from another variable or from a constant.voidSet the field using opaque mode.voidSet the field using plain mode, ignoring any volatile declaration.voidsetRelease(Object value) Set the field using release mode.voidsetVolatile(Object value) Set the field as if it was declared volatile.default FieldFields cannot have a signature defined within the body of a method, and so this method always throws anIllegalStateException.Returns aVarHandlevariable which accesses the field.weakCompareAndSet(Object expectedValue, Object newValue) weakCompareAndSetAcquire(Object expectedValue, Object newValue) weakCompareAndSetPlain(Object expectedValue, Object newValue) weakCompareAndSetRelease(Object expectedValue, Object newValue) Methods inherited from interface Variable
add, addAnnotation, aget, alength, and, aset, box, boxedType, cast, classType, clear, com, condy, dec, div, eq, field, ge, get, gt, ifEq, ifEq, ifEq, ifFalse, ifFalse, ifFalse, ifGe, ifGe, ifGe, ifGt, ifGt, ifGt, ifLe, ifLe, ifLe, ifLt, ifLt, ifLt, ifNe, ifNe, ifNe, ifTrue, ifTrue, ifTrue, inc, indy, instanceOf, invoke, invoke, le, lt, makerType, methodHandle, methodMaker, monitorEnter, monitorExit, mul, name, ne, neg, not, or, rem, setExact, shl, shr, sub, switch_, switch_, switch_, switch_, synchronized_, throw_, type, unbox, unboxedType, ushr, xorModifier and TypeMethodDescriptionAdd this variable with another variable or a constant, and assign the result to a new variable.default AnnotationMakeraddAnnotation(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.voidSet an element into this array.box()Box this primitive variable into its object peer.Class<?> Returns a boxed object type for this variable.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.voidDecrement 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 voidConvenience method to generate conditional code if this variable is equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is equal to another variable or constant.voidConditional goto if this variable is equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is false.default voidConvenience method to generate conditional code if this variable is false.voidConditional goto if this variable is false.default voidConvenience method to generate conditional code if this variable is greater than or equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is greater than or equal to another variable or constant.voidConditional goto if this variable is greater than or equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is greater than another variable or constant.default voidConvenience method to generate conditional code if this variable is greater than another variable or constant.voidConditional goto if this variable is greater than another variable or constant.default voidConvenience method to generate conditional code if this variable is less than or equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is less than or equal to another variable or constant.voidConditional goto if this variable is less than or equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is less than another variable or constant.default voidConvenience method to generate conditional code if this variable is less than another variable or constant.voidConditional goto if this variable is less than another variable or constant.default voidConvenience method to generate conditional code if this variable is not equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is not equal to another variable or constant.voidConditional goto if this variable is not equal to another variable or constant.default voidConvenience method to generate conditional code if this variable is true.default voidConvenience method to generate conditional code if this variable is true.voidConditional goto if this variable is true.voidIncrement 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 aMethodHandlevariable which can invoke a static or instance method on the object referenced by this variable.Returns theMethodMakerthat this variable belongs to.voidEnter a synchronized block on this variable.voidExit 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 it's unnamed.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 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.Subtract this variable with another variable or a constant, and assign the result to a new variable.voidGenerates a switch statement against thisintor non-nullIntegervariable.voidGenerates a switch statement against this non-nullEnumvariable.voidGenerates a switch statement against this non-null variable, of any type.voidGenerates a switch statement against this non-nullStringvariable.voidsynchronized_(Runnable body) Convenience method for defining a synchronized block on this variable.voidthrow_()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.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
-
name
Fields cannot be renamed, and so this method always throws anIllegalStateException. -
signature
Fields cannot have a signature defined within the body of a method, and so this method always throws anIllegalStateException. -
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
MethodHandlecan be set with aMethodHandleInfo, which is converted automatically at link time. Handling ofConstantDescandConstableis also treated specially — the actual type is determined by the resolved constant. -
getPlain
Variable getPlain()Access the field using plain mode, ignoring any volatile declaration.- Returns:
- the result in a new variable, with the same type as this one
- See Also:
-
setPlain
Set the field using plain mode, ignoring any volatile declaration.- See Also:
-
getOpaque
Variable getOpaque()Access the field using opaque mode.- Returns:
- the result in a new variable, with the same type as this one
- See Also:
-
setOpaque
-
getAcquire
Variable getAcquire()Access the field using acquire mode.- Returns:
- the result in a new variable, with the same type as this one
- See Also:
-
setRelease
-
getVolatile
Variable getVolatile()Access the field as if it was declared volatile.- Returns:
- the result in a new variable, with the same type as this one
- See Also:
-
setVolatile
-
compareAndSet
-
compareAndExchange
-
compareAndExchangeAcquire
-
compareAndExchangeRelease
-
weakCompareAndSetPlain
-
weakCompareAndSet
-
weakCompareAndSetAcquire
-
weakCompareAndSetRelease
-
getAndSet
-
getAndSetAcquire
-
getAndSetRelease
-
getAndAdd
-
getAndAddAcquire
-
getAndAddRelease
-
getAndBitwiseOr
-
getAndBitwiseOrAcquire
-
getAndBitwiseOrRelease
-
getAndBitwiseAnd
-
getAndBitwiseAndAcquire
-
getAndBitwiseAndRelease
-
getAndBitwiseXor
-
getAndBitwiseXorAcquire
-
getAndBitwiseXorRelease
-
varHandle
Variable varHandle()Returns aVarHandlevariable which accesses the field. If this is an ordinary field, the variable is actually a constant, and so it can be supplied as an argument to abootstrapmethod or be used by another method in the same class. For non-static fields, the firstVarHandlecoordinate is the object instance which owns the field. Static fields have no coordinates. -
methodHandleSet
Variable methodHandleSet()Returns aMethodHandlevariable for setting the field value. If this is an ordinary field, the variable is actually a constant, and so it can be supplied as an argument to abootstrapmethod or be used by another method in the same class. For non-static fields, theMethodHandleaccepts two arguments: the object instance which owns the field, and the value to set. For static fields, the only argument is the value to set. -
methodHandleGet
Variable methodHandleGet()Returns aMethodHandlevariable for getting the field value. If this is an ordinary field, the variable is actually a constant, and so it can be supplied as an argument to abootstrapmethod or be used by another method in the same class. For non-static fields, theMethodHandleaccepts one argument: the object instance which owns the field. For static fields, there are no arguments.
-