- All Superinterfaces:
SimpleTyped,Typed
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidEmit an acquire fence.booleanactive()Returns true if the current block is activated (in scope), or false if it is not.default ExprThe arithmetic addition operator.default ExprThe arithmetic addition operator.default ExprThe arithmetic addition operator.default ExprThe arithmetic addition operator.The arithmetic addition operator.voidaddAssign(Assignable var, Expr arg) Add the argument to the variable value and assign it back.default ExprThe bitwiseandoperator.default ExprThe bitwiseandoperator.The bitwiseandoperator.voidandAssign(Assignable var, Expr arg) Bitwise-AND the argument with the variable value and assign it back.arrayEquals(Expr a, Expr b) Generates call to one of theArrays#equals(a, b)overloads, based on the type of the first argument, or toArrays#deepEquals(a, b)in case of multidimensional arrays.arrayHashCode(Expr expr) Generates call to one of theArrays#hashCode(expr)overloads, based on the type of the argument, or toArrays#deepHashCode(expr)in case of multidimensional arrays.arrayToString(Expr expr) Generates call to one of theArrays#toString(expr)overloads, based on the type of the argument, or toArrays#deepToString(expr)in case of multidimensional arrays.voidassert_(Consumer<BlockCreator> assertion, String message) Produce an assertion.voidautoClose(Expr resource, BiConsumer<BlockCreator, ? super LocalVar> body) Open a resource and run the given body with the resource, automatically closing it at the end.voidautoClose(Var resource, Consumer<BlockCreator> body) Open a resource and run the given body with the resource, automatically closing it at the end.voidblock(Consumer<BlockCreator> nested) Create a nested block.default ExprblockExpr(Class<?> type, Consumer<BlockCreator> nested) Create a block expression of giventype.blockExpr(ClassDesc type, Consumer<BlockCreator> nested) Create a block expression of giventype.Box the given primitive value into its corresponding box type.voidbreak_(BlockCreator outer) Exit the given enclosing block.cast(Expr a, GenericType toType) Cast a value to the given type.default ExprCast a value to the given type.Cast a value to the given type.classForName(Expr className) Generate a call toClass.forName(String)which uses the defining class loader of this class.voidClose the given target.The general comparison operator.The general comparison operator.The general comparison operator.default ExprcompareAndExchange(Assignable var, Expr expected, Expr update) compareAndExchange(Assignable var, Expr expected, Expr update, MemoryOrder order) compareAndSet(Assignable var, Expr expected, Expr update) Atomically sets the value ofvartoupdateif its current value is equal toexpected.complement(Expr a) The bitwise complement operator.default Exprcond(Class<?> type, Expr cond, Consumer<BlockCreator> ifTrue, Consumer<BlockCreator> ifFalse) Evaluate a conditional expression (the?:operator).cond(ClassDesc type, Expr cond, Consumer<BlockCreator> ifTrue, Consumer<BlockCreator> ifFalse) Evaluate a conditional expression (the?:operator).default booleancontains(BlockCreator other) Returns true if this block contains the given block, or false if it does not.default booleanReturns true if this block contains the block that owns the given variable, or false if it does not.voidcontinue_(BlockCreator loop) Resume the next iteration of an enclosing loop.Returns an expression representing the current thread from the perspective of the running method body.default voiddec(Assignable var) Decrement some variable by one.default voiddec(Assignable var, int amount) Decrement some variable by a constant amount.voiddec(Assignable var, Const amount) Decrement some variable by a constant amount.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.default ExprThe arithmetic division operator.The arithmetic division operator.voiddivAssign(Assignable var, Expr arg) Divide the argument with the variable value and assign it back.booleandone()Returns true if the block is done, or false if it is not.voiddoWhile(Consumer<BlockCreator> body, Consumer<BlockCreator> cond) Enter ado-whileloop.default ExprThe equality operator.default ExprThe equality operator.default ExprThe equality operator.default ExprThe equality operator.The equality operator.exprEquals(Expr a, Expr b) Generates call to theObjects#equals(a, b)method if at least one of the given expressions is of a reference type (boxing the other if primitive).exprHashCode(Expr expr) Generates call to one of the static methods to compute a hash code of given expression.exprToString(Expr expr) Generates call to one of theString#valueOf(expr)overloads, based on the type of the argument.voidforEach(Expr items, BiConsumer<BlockCreator, ? super LocalVar> builder) Build a for-each loop over an array or collection.default voidEmit a full fence.default ExprThe greater-than-or-equals operator.default ExprThe greater-than-or-equals operator.default ExprThe greater-than-or-equals operator.default ExprThe greater-than-or-equals operator.The greater-than-or-equals operator.default Exprget(Assignable var) Read a value from memory using the declared atomicity mode for the assignable.get(Assignable var, MemoryOrder mode) Read a value from memory with the given atomicity mode.default ExprgetAndAdd(Assignable var, Expr amount) Atomically get, add, and store the value of the target assignable expression usingvolatilesemantics.getAndAdd(Assignable var, Expr amount, MemoryOrder order) Atomically get, add, and store the value of the target assignable expression.default ExprgetAndBitwiseAnd(Assignable var, Expr other) Atomically get, bitwise-and, and store the value of the target assignable expression withvolatilesemantics.getAndBitwiseAnd(Assignable var, Expr other, MemoryOrder order) Atomically get, bitwise-and, and store the value of the target assignable expression.default ExprgetAndBitwiseOr(Assignable var, Expr other) Atomically get, bitwise-or, and store the value of the target assignable expression withvolatilesemantics.getAndBitwiseOr(Assignable var, Expr other, MemoryOrder order) Atomically get, bitwise-or, and store the value of the target assignable expression.default ExprgetAndBitwiseXor(Assignable var, Expr other) Atomically get, bitwise-xor, and store the value of the target assignable expression withvolatilesemantics.getAndBitwiseXor(Assignable var, Expr other, MemoryOrder order) Atomically get, bitwise-xor, and store the value of the target assignable expression.default ExprgetAndSet(Assignable var, Expr newValue) Atomically get and set the value of the target assignable expression usingvolatilesemantics.getAndSet(Assignable var, Expr newValue, MemoryOrder order) Atomically get and set the value of the target assignable expression.default ExprgetStaticField(FieldDesc desc) Read the value from a static field.voidgoto_(BlockCreator outer) Jump to the start of the given enclosing block.default voidgotoCase(SwitchCreator switch_, int case_) Jump to a specific case in the given enclosingswitch.voidgotoCase(SwitchCreator switch_, Const case_) Jump to a specific case in the given enclosingswitch.default voidgotoCase(SwitchCreator switch_, Class<?> case_) Jump to a specific case in the given enclosingswitch.default voidgotoCase(SwitchCreator switch_, Enum<?> case_) Jump to a specific case in the given enclosingswitch.default voidgotoCase(SwitchCreator switch_, String case_) Jump to a specific case in the given enclosingswitch.voidgotoDefault(SwitchCreator switch_) Jump to the default case in the given enclosingswitch.default voidJump to the start of this block.default ExprThe greater-than operator.default ExprThe greater-than operator.default ExprThe greater-than operator.default ExprThe greater-than operator.The greater-than operator.voidif_(Expr cond, Consumer<BlockCreator> whenTrue) A generalifconditional.voidifElse(Expr cond, Consumer<BlockCreator> whenTrue, Consumer<BlockCreator> whenFalse) A generalif-elseconditional.default voidifInstanceOf(Expr obj, Class<?> type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue) If the given object is an instance of the given type, then execute the block with the narrowed object.voidifInstanceOf(Expr obj, ClassDesc type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue) If the given object is an instance of the given type, then execute the block with the narrowed object.default voidifInstanceOfElse(Expr obj, Class<?> type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue, Consumer<BlockCreator> ifFalse) If the given object is an instance of the given type, then execute the first block with the narrowed object, otherwise execute the other block.voidifInstanceOfElse(Expr obj, ClassDesc type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue, Consumer<BlockCreator> ifFalse) If the given object is an instance of the given type, then execute the first block with the narrowed object, otherwise execute the other block.voidifNot(Expr cond, Consumer<BlockCreator> whenFalse) An invertedifconditional.default voidifNotInstanceOf(Expr obj, Class<?> type, Consumer<BlockCreator> ifFalse) If the given object is not an instance of the given type, then execute the given block.voidifNotInstanceOf(Expr obj, ClassDesc type, Consumer<BlockCreator> ifFalse) If the given object is not an instance of the given type, then execute the given block.default voidifNotNull(Expr obj, Consumer<BlockCreator> whenTrue) Anif (obj != null)conditional.default voidifNull(Expr obj, Consumer<BlockCreator> whenTrue) Anif (obj == null)conditional.default voidinc(Assignable var) Increment some variable by one.default voidinc(Assignable var, int amount) Increment some variable by a constant amount.voidinc(Assignable var, Const amount) Increment some variable by a constant amount.instanceOf(Expr obj, GenericType type) Test whether the given object implements the given type.default ExprinstanceOf(Expr obj, Class<?> type) Test whether the given object implements the given type.instanceOf(Expr obj, ClassDesc type) Test whether the given object implements the given type.default ExprinvokeDynamic(DynamicCallSiteDesc callSiteDesc, Expr... args) invokeDynamic(DynamicCallSiteDesc callSiteDesc, List<? extends Expr> args) default ExprinvokeInterface(MethodDesc method, Expr instance) Invoke an interface method.default ExprinvokeInterface(MethodDesc method, Expr instance, Expr arg0) Invoke an interface method.default ExprinvokeInterface(MethodDesc method, Expr instance, Expr... args) Invoke an interface method.default ExprinvokeInterface(MethodDesc method, Expr instance, Expr arg0, Expr arg1) Invoke an interface method.invokeInterface(MethodDesc method, Expr instance, List<? extends Expr> args) Invoke an interface method.invokeInterface(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke an interface method.default ExprinvokeSpecial(ConstructorDesc ctor, Expr instance) Invoke a constructor using "special" semantics.default ExprinvokeSpecial(ConstructorDesc ctor, Expr instance, Expr arg0) Invoke a constructor using "special" semantics.default ExprinvokeSpecial(ConstructorDesc ctor, Expr instance, Expr... args) Invoke a constructor using "special" semantics.default ExprinvokeSpecial(ConstructorDesc ctor, Expr instance, Expr arg0, Expr arg1) Invoke a constructor using "special" semantics.invokeSpecial(ConstructorDesc ctor, Expr instance, List<? extends Expr> args) Invoke a constructor using "special" semantics.default ExprinvokeSpecial(MethodDesc method, Expr instance) Invoke a method using "special" semantics.default ExprinvokeSpecial(MethodDesc method, Expr instance, Expr arg0) Invoke a method using "special" semantics.default ExprinvokeSpecial(MethodDesc method, Expr instance, Expr... args) Invoke a method using "special" semantics.default ExprinvokeSpecial(MethodDesc method, Expr instance, Expr arg0, Expr arg1) Invoke a method using "special" semantics.invokeSpecial(MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a method using "special" semantics.invokeSpecial(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a method using "special" semantics.default ExprinvokeStatic(MethodDesc method) Invoke a static method.default ExprinvokeStatic(MethodDesc method, Expr arg0) Invoke a static method.default ExprinvokeStatic(MethodDesc method, Expr... args) Invoke a static method.default ExprinvokeStatic(MethodDesc method, Expr arg0, Expr arg1) Invoke a static method.invokeStatic(MethodDesc method, List<? extends Expr> args) Invoke a static method.invokeStatic(GenericType genericReturnType, MethodDesc method, List<? extends Expr> args) Invoke a static method.default ExprinvokeVirtual(MethodDesc method, Expr instance) Invoke a virtual method.default ExprinvokeVirtual(MethodDesc method, Expr instance, Expr arg0) Invoke a virtual method.default ExprinvokeVirtual(MethodDesc method, Expr instance, Expr... args) Invoke a virtual method.default ExprinvokeVirtual(MethodDesc method, Expr instance, Expr arg0, Expr arg1) Invoke a virtual method.invokeVirtual(MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a virtual method.invokeVirtual(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a virtual method.booleanisContainedBy(BlockCreator other) Returns true if this block is contained by the given block, or false if it is not.default Exprdefault ExprIterate the given target.lambda(MethodDesc sam, ClassDesc owner, Consumer<LambdaCreator> builder) Construct a lambda instance with the given type.default Exprlambda(MethodDesc sam, Consumer<LambdaCreator> builder) Construct a lambda instance with the given type.default Exprlambda(Class<?> type, Consumer<LambdaCreator> builder) Construct a lambda instance with the given type.default ExprThe less-than-or-equals operator.default ExprThe less-than-or-equals operator.default ExprThe less-than-or-equals operator.default ExprThe less-than-or-equals operator.The less-than-or-equals operator.voidline(int lineNumber) Change the current line number from this point.default ExprGenerate a call toList.of()or one of its variants, based on the number of arguments.default ExprGenerate a call toList.of()or one of its variants, based on the number of arguments.<T> ExprGenerate a call toList.of()or one of its variants, based on the number of arguments.default voidEmit a LoadLoad fence.default LocalVarDeclare a local variable, which is initialized to the given variable's current value.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.localVar(String name, GenericType type, Expr value) Declare a local variable with givennameandtype, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givennameandtype, which is initialized to the givenvalue.Declare a local variable with givennameandtype, which is initialized to the givenvalue.default LocalVarDeclare a local variable with givenname, which is initialized to the givenvalue.voidlocked(Expr jucLock, Consumer<BlockCreator> body) Create a block which holds aLock.default ExprlogicalAnd(Expr cond, Consumer<BlockCreator> other) Perform a short-circuiting logical-AND operation (the&&operator).default ExprlogicalNot(Expr a) Returns an expression which is the logical (boolean) opposite of the input expression.default ExprlogicalOr(Expr cond, Consumer<BlockCreator> other) Perform a short-circuiting logical-OR operation (the||operator).voidloop(Consumer<BlockCreator> body) Enter a loop.default ExprThe less-than operator.default ExprThe less-than operator.default ExprThe less-than operator.default ExprThe less-than operator.The less-than operator.Generate a call toMap.entry(Object, Object).default ExprGenerate a call toMap.of()or one of its variants, based on the number of arguments.Generate a call toMap.of()or one of its variants, based on the number of arguments.default ExprThe arithmetic multiplication operator.default ExprThe arithmetic multiplication operator.default ExprThe arithmetic multiplication operator.default ExprThe arithmetic multiplication operator.The arithmetic multiplication operator.voidmulAssign(Assignable var, Expr arg) Multiply the argument with the variable value and assign it back.default ExprThe inequality operator.default ExprThe inequality operator.default ExprThe inequality operator.default ExprThe inequality operator.The inequality operator.The arithmetic negation operator.default Exprnew_(ConstructorDesc ctor) Construct a new instance.default Exprnew_(ConstructorDesc ctor, Expr arg0) Construct a new instance.default Exprnew_(ConstructorDesc ctor, Expr... args) Construct a new instance.default Exprnew_(ConstructorDesc ctor, Expr arg0, Expr arg1) Construct a new instance.new_(ConstructorDesc ctor, List<? extends Expr> args) Construct a new instance.default Exprnew_(GenericType type) Construct a new instance.new_(GenericType genericType, ConstructorDesc ctor, List<? extends Expr> args) Construct a new instance.default Exprnew_(GenericType type, Expr arg0) Construct a new instance.default Exprnew_(GenericType type, Expr... args) Construct a new instance.default Exprnew_(GenericType type, Expr arg0, Expr arg1) Construct a new instance.default Exprnew_(GenericType type, List<? extends Expr> args) Construct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.default ExprConstruct a new instance.newAnonymousClass(ConstructorDesc superCtor, List<? extends Expr> args, Consumer<AnonymousClassCreator> builder) Create a new anonymous class instance.default ExprnewAnonymousClass(Class<?> supertype, Consumer<AnonymousClassCreator> builder) Create a new anonymous class instance which extends the given class or implements the given interface.default ExprnewAnonymousClass(ClassDesc interface_, Consumer<AnonymousClassCreator> builder) Create a new anonymous class instance which implements the given interface.default ExprCreate a new array with the given type, initialized with the given values.default ExprCreate a new array with the given type, initialized with the given values.default <T> ExprCreate a new array with the given type, initialized with the given values.default ExprCreate a new array with the given type, initialized with the given values.default ExprCreate a new array with the given type, initialized with the given values.<T> ExprCreate a new array with the given type, initialized with the given values.default ExprnewEmptyArray(Class<?> componentType, int size) Create a new, empty array of the given type with given size.default ExprnewEmptyArray(Class<?> componentType, Expr size) Create a new, empty array of the given type with given size.default ExprnewEmptyArray(ClassDesc componentType, int size) Create a new, empty array of the given type with given size.newEmptyArray(ClassDesc componentType, Expr size) Create a new, empty array of the given type with given size.default ExprDeprecated.default ExprobjHashCode(Expr expr) Deprecated.useexprHashCode(Expr)instead.default ExprobjToString(Expr expr) Deprecated.useexprToString(Expr)instead.Generate a call toOptional.empty().optionalOf(Expr value) Generate a call toOptional.of(Object).optionalOfNullable(Expr value) Generate a call toOptional.ofNullable(Object).default ExprThe bitwiseoroperator.default ExprThe bitwiseoroperator.The bitwiseoroperator.voidorAssign(Assignable var, Expr arg) Bitwise-OR the argument with the variable value and assign it back.default voidInsert aprintfstatement.voidInsert aprintfstatement.default voidreachabilityFence(Expr obj) Emit a reachability fence for the given object expression.default voidEmit a release fence.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.default ExprThe arithmetic remainder operator.The arithmetic remainder operator.voidremAssign(Assignable var, Expr arg) Divide the argument with the variable value and assign the remainder back.voidreturn_()Return from the current method.default voidreturn_(boolean val) Return from the current method.default voidreturn_(int val) Return from the current method.voidReturn from the current method.default voidReturn from the current method.default voidReturn from the current method.default voidReturnfalsefrom the current method.default voidReturn0from the current method.voidReturnnullfrom the current method.default voidReturntruefrom the current method.default voidrotate(Assignable var1, Assignable var2, Assignable var3) Rotate the values of three variables one position to the right without requiring an intermediate temporary variable.default voidrotate(Assignable var1, Assignable var2, Assignable var3, Assignable var4) Rotate the values of four variables one position to the right without requiring an intermediate temporary variable.default voidset(Assignable var, int value) Write a value to memory using the declared atomicity mode for the assignable.default voidset(Assignable var, long value) Write a value to memory using the declared atomicity mode for the assignable.default voidset(Assignable var, Const value) Write a value to memory using the declared atomicity mode for the assignable.default voidset(Assignable var, Expr value) Write a value to memory using the declared atomicity mode for the assignable.voidset(Assignable var, Expr value, MemoryOrder mode) Write a value to memory with the given atomicity mode.default voidset(Assignable var, Constable value) Write a value to memory using the declared atomicity mode for the assignable.default voidset(Assignable var, ConstantDesc value) Write a value to memory using the declared atomicity mode for the assignable.default voidset(Assignable var, String value) Write a value to memory using the declared atomicity mode for the assignable.default ExprGenerate a call toSet.of()or one of its variants, based on the number of arguments.default ExprGenerate a call toSet.of()or one of its variants, based on the number of arguments.<T> ExprGenerate a call toSet.of()or one of its variants, based on the number of arguments.default voidsetStaticField(FieldDesc desc, Expr value) Write the value to a static field.default ExprThe bitwise left-shift operator.default ExprThe bitwise left-shift operator.The bitwise left-shift operator.voidshlAssign(Assignable var, Expr arg) Bitwise-left-shift the argument with the variable value and assign it back.default ExprThe bitwise signed-right-shift operator.default ExprThe bitwise signed-right-shift operator.The bitwise signed-right-shift operator.voidshrAssign(Assignable var, Expr arg) Arithmetically bitwise-right-shift the argument with the variable value and assign it back.default voidEmit a StoreStore fence.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.default ExprThe arithmetic subtraction operator.The arithmetic subtraction operator.voidsubAssign(Assignable var, Expr arg) Subtract the argument from the variable value and assign it back.default voidswap(Assignable var1, Assignable var2) Swap the values of two variables without requiring an intermediate temporary variable.default voidswitch_(Expr val, Consumer<SwitchCreator> builder) Construct aswitchstatement.default Exprswitch_(Class<?> outputType, Expr val, Consumer<SwitchCreator> builder) Construct aswitchexpression.switch_(ClassDesc outputType, Expr val, Consumer<SwitchCreator> builder) Construct aswitchexpression.default voidswitchEnum(Expr val, Consumer<SwitchCreator> builder) Construct aswitchstatement forenumconstants.default ExprswitchEnum(Class<?> outputType, Expr val, Consumer<SwitchCreator> builder) Construct aswitchexpression forenumconstants.switchEnum(ClassDesc outputType, Expr val, Consumer<SwitchCreator> builder) Construct aswitchexpression forenumconstants.voidsynchronized_(Expr monitor, Consumer<BlockCreator> body) Create asynchronizedblock.voidThrow the given exception object.default voidThrow a new exception of the given type.default voidThrow a new exception of the given type with a message.default voidThrow a new exception of the given type with a message.default voidThrow a new exception of the given type.default voidThrow a new exception of the given type with a message.default voidThrow a new exception of the given type with a message.voidtry_(Consumer<TryCreator> body) Enter atryblock.type()Returns the type of this block (may bevoid).Unbox the given boxed value into its corresponding primitive type.uncheckedCast(Expr a, GenericType toType) Cast an object value to the given type without a type check.default ExpruncheckedCast(Expr a, Class<?> toType) Cast an object value to the given type without a type check.uncheckedCast(Expr a, ClassDesc toType) Cast an object value to the given type without a type check.default ExprThe bitwise unsigned-right-shift operator.default ExprThe bitwise unsigned-right-shift operator.The bitwise unsigned-right-shift operator.voidushrAssign(Assignable var, Expr arg) Logically bitwise-right-shift the argument with the variable value and assign it back.default ExprweakCompareAndSet(Assignable var, Expr expected, Expr update) Atomically sets the value ofvartoupdateif its current value is equal toexpected, usingvolatilememory ordering.weakCompareAndSet(Assignable var, Expr expected, Expr update, MemoryOrder order) Atomically sets the value ofvartoupdateif its current value is equal toexpected.voidwhile_(Consumer<BlockCreator> cond, Consumer<BlockCreator> body) Enter awhileloop.default ClassOpsReturns a convenience wrapper for accessing instance methods ofClass.default CollectionOpswithCollection(Expr receiver) Returns a convenience wrapper for accessing instance methods ofCollection.default IteratorOpswithIterator(Expr receiver) Returns a convenience wrapper for accessing instance methods ofIterator.default ListOpsReturns a convenience wrapper for accessing instance methods ofList.default MapOpsReturns a convenience wrapper for accessing instance methods ofMap.default ObjectOpswithObject(Expr receiver) Returns a convenience wrapper for accessing instance methods ofObject.default OptionalOpswithOptional(Expr receiver) Returns a convenience wrapper for accessing instance methods ofOptional.default SetOpsReturns a convenience wrapper for accessing instance methods ofSet.default StringOpswithString(Expr receiver) Returns a convenience wrapper for accessing instance methods ofString.default ThrowableOpswithThrowable(Expr throwable) Returns a convenience wrapper for accessing instance methods ofThrowable.default ExprThe bitwisexoroperator.default ExprThe bitwisexoroperator.The bitwisexoroperator.voidxorAssign(Assignable var, Expr arg) Bitwise-XOR (exclusive OR) the argument with the variable value and assign it back.voidYield a value from this block.default voidYield anullvalue from this block.Methods inherited from interface io.quarkus.gizmo2.SimpleTyped
isPrimitive, isVoid, slotSize, typeKind
-
Method Details
-
type
ClassDesc type()Returns the type of this block (may bevoid). If the type is non-void, then the block must yield a value if it does not exit explicitly some other way.- Specified by:
typein interfaceSimpleTyped- Specified by:
typein interfaceTyped- Returns:
- the type of this block (may be
void)
-
yield
Yield a value from this block. If control falls out of a block, an implicityield(Constant.ofVoid())is added to terminate it.- Parameters:
value- the value to yield (must not benull)- Throws:
IllegalArgumentException- if the value type does not match the type of the block
-
yieldNull
default void yieldNull()Yield anullvalue from this block.- Throws:
IllegalArgumentException- if this block's type is primitive orvoid
-
active
boolean active()Returns true if the current block is activated (in scope), or false if it is not. Blocks which are not active may not have operations added to them. Blocks are inactive when a nested scope is active or when the block is terminated.- Returns:
- true if the current block is activated (in scope), or false if it is not
-
done
boolean done()Returns true if the block is done, or false if it is not.- Returns:
- true if the block is done, or false if it is not
-
isContainedBy
Returns true if this block is contained by the given block, or false if it is not.- Parameters:
other- the containing block (must not benull)- Returns:
- true if this block is contained by the given block, or false if it is not
-
contains
Returns true if this block contains the given block, or false if it does not.- Parameters:
other- the contained block (must not benull)- Returns:
- true if this block contains the given block, or false if it does not
-
contains
Returns true if this block contains the block that owns the given variable, or false if it does not.- Parameters:
var- the variable (must not benull)- Returns:
- true if this block contains the block that owns the given variable, or false if it does not
-
localVar
Declare a local variable with givennameandtype, which is initialized to the givenvalue.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)type- the variable type (must not benull)value- the variable initial value (must not benull)- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givennameandtype, which is initialized to the givenvalue.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)type- the variable type (must not benull)value- the variable initial value (must not benull)- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givennameandtype, which is initialized to the givenvalue.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)type- the variable type (must not benull)value- the variable initial value (must not benull)- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable is the type of thevalue.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value (must not benull)- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable isboolean.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable isint.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable islong.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable isfloat.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable isdouble.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable with givenname, which is initialized to the givenvalue. The type of the new variable isString.Variable names are not strictly required to be unique, but it is a good practice.
- Parameters:
name- the variable name (must not benull)value- the variable initial value (must not benull)- Returns:
- the local variable (not
null)
-
localVar
Declare a local variable, which is initialized to the given variable's current value. The name and type of the new variable are the same as the name and type of theoriginal.- Parameters:
original- the original variable (must not benull)- Returns:
- the new local variable (not
null)
-
get
Read a value from memory with the given atomicity mode.- Parameters:
var- the assignable (must not benull)mode- the atomicity mode for the access (must not benull)- Returns:
- the memory value (not
null)
-
get
Read a value from memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)- Returns:
- the memory value (not
null)
-
getStaticField
Read the value from a static field.- Parameters:
desc- the field descriptor (must not benull)- Returns:
- the memory value (not
null)
-
set
Write a value to memory with the given atomicity mode.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)mode- the atomicity mode for the access (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write (must not benull)
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write
-
set
Write a value to memory using the declared atomicity mode for the assignable.- Parameters:
var- the assignable (must not benull)value- the value to write
-
setStaticField
Write the value to a static field.- Parameters:
desc- the field descriptor (must not benull)value- the value to write (must not benull)
-
swap
Swap the values of two variables without requiring an intermediate temporary variable.- Parameters:
var1- the first variable (must not benull)var2- the second variable (must not benull)
-
rotate
Rotate the values of three variables one position to the right without requiring an intermediate temporary variable. The rightmost value is moved to the leftmost variable.- Parameters:
var1- the first variable (must not benull)var2- the second variable (must not benull)var3- the third variable (must not benull)
-
rotate
Rotate the values of four variables one position to the right without requiring an intermediate temporary variable. The rightmost value is moved to the leftmost variable.- Parameters:
var1- the first variable (must not benull)var2- the second variable (must not benull)var3- the third variable (must not benull)var4- the fourth variable (must not benull)
-
inc
Increment some variable by a constant amount. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)amount- the constant amount to increase by (must not benull)
-
inc
Increment some variable by a constant amount. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)amount- the constant amount to increase by
-
inc
Increment some variable by one. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)
-
dec
Decrement some variable by a constant amount. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)amount- the constant amount to decrease by (must not benull)
-
dec
Decrement some variable by a constant amount. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)amount- the constant amount to decrease by
-
dec
Decrement some variable by one. This is not an atomic operation.- Parameters:
var- the variable to modify (must not benull)
-
compareAndSet
Atomically sets the value ofvartoupdateif its current value is equal toexpected.- Parameters:
var- the variable to update (must not benull)expected- the expected comparison value (must not benull)update- the new value to set (must not benull)- Returns:
- a
boolean-typed expression that istrueif the update succeeded orfalseif it did not
-
weakCompareAndSet
Atomically sets the value ofvartoupdateif its current value is equal toexpected. The comparison is "weak", meaning that it may fail sporadically. The given memory order is used, and must be one of:- Parameters:
var- the variable to update (must not benull)expected- the expected comparison value (must not benull)update- the new value to set (must not benull)order- the memory order which is used for the operation (must not benull)- Returns:
- a
boolean-typed expression that istrueif the update succeeded orfalseif it did not - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
weakCompareAndSet
Atomically sets the value ofvartoupdateif its current value is equal toexpected, usingvolatilememory ordering. The comparison is "weak", meaning that it may fail sporadically.- Parameters:
var- the variable to update (must not benull)expected- the expected comparison value (must not benull)update- the new value to set (must not benull)- Returns:
- a
boolean-typed expression that istrueif the update succeeded orfalseif it did not - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
compareAndExchange
-
compareAndExchange
-
getAndSet
Atomically get and set the value of the target assignable expression. The given memory order is used, and must be one of:- Parameters:
var- the target assignable expression (must not benull)newValue- the value to store (must not benull)order- the memory order (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
getAndSet
Atomically get and set the value of the target assignable expression usingvolatilesemantics.- Parameters:
var- the target assignable expression (must not benull)newValue- the value to store (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
getAndAdd
Atomically get, add, and store the value of the target assignable expression. The given memory order is used, and must be one of:- Parameters:
var- the target assignable expression (must not benull)amount- the value to add to the target (must not benull)order- the memory order (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
getAndAdd
Atomically get, add, and store the value of the target assignable expression usingvolatilesemantics.- Parameters:
var- the target assignable expression (must not benull)amount- the value to add to the target (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
getAndBitwiseOr
Atomically get, bitwise-or, and store the value of the target assignable expression. The given memory order is used, and must be one of:- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-or with the target (must not benull)order- the memory order (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
getAndBitwiseOr
Atomically get, bitwise-or, and store the value of the target assignable expression withvolatilesemantics.- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-or with the target (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
getAndBitwiseAnd
Atomically get, bitwise-and, and store the value of the target assignable expression. The given memory order is used, and must be one of:- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-and with the target (must not benull)order- the memory order (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
getAndBitwiseAnd
Atomically get, bitwise-and, and store the value of the target assignable expression withvolatilesemantics.- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-and with the target (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
getAndBitwiseXor
Atomically get, bitwise-xor, and store the value of the target assignable expression. The given memory order is used, and must be one of:- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-xor with the target (must not benull)order- the memory order (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically, or iforderis not one of the allowed values
-
getAndBitwiseXor
Atomically get, bitwise-xor, and store the value of the target assignable expression withvolatilesemantics.- Parameters:
var- the target assignable expression (must not benull)other- the value to bitwise-xor with the target (must not benull)- Returns:
- the previous value of the target expression (not
null) - Throws:
IllegalArgumentException- if the target variable cannot be accessed atomically
-
fullFence
default void fullFence()Emit a full fence. -
acquireFence
default void acquireFence()Emit an acquire fence. -
releaseFence
default void releaseFence()Emit a release fence. -
loadLoadFence
default void loadLoadFence()Emit a LoadLoad fence. -
storeStoreFence
default void storeStoreFence()Emit a StoreStore fence. -
reachabilityFence
Emit a reachability fence for the given object expression.- Parameters:
obj- the object expression (must not benull)- Throws:
IllegalArgumentException- if the expression is not a reference type
-
newEmptyArray
Create a new, empty array of the given type with given size.- Parameters:
componentType- the component type (must not benull)size- the size of the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
newEmptyArray
Create a new, empty array of the given type with given size.- Parameters:
componentType- the component type (must not benull)size- the size of the array- Returns:
- the expression for the new array (not
null)
-
newEmptyArray
Create a new, empty array of the given type with given size.- Parameters:
componentType- the component type (must not benull)size- the size of the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
newEmptyArray
Create a new, empty array of the given type with given size.- Parameters:
componentType- the component type (must not benull)size- the size of the array- Returns:
- the expression for the new array (not
null)
-
newArray
Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array after mapping (must not benull)mapper- function that turns values into expressions (must not benull)- Returns:
- the expression for the new array (not
null)
-
newArray
Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
newArray
Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
newArray
default <T> Expr newArray(Class<?> componentType, List<T> values, Function<T, ? extends Expr> mapper) Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array after mapping (must not benull)mapper- function that turns values into expressions (must not benull)- Returns:
- the expression for the new array (not
null)
-
newArray
Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
newArray
Create a new array with the given type, initialized with the given values.- Parameters:
componentType- the component type (must not benull)values- the values to assign into the array (must not benull)- Returns:
- the expression for the new array (not
null)
-
isNull
-
isNotNull
-
eq
The equality operator. The arguments must be of the same type kind. This works equivalently to the==operator in Java for primitive and reference values. For object equality usingObject.equals(java.lang.Object), seeexprEquals(Expr, Expr).- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument (must not benull)- Returns:
- the boolean result expression
- See Also:
-
eq
The equality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the==operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
eq
The equality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the==operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
eq
The equality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the==operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
eq
The equality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the==operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ne
The inequality operator. The arguments must be of the same type kind. This works equivalently to the!=operator in Java for primitive and reference values. For object equality usingObject.equals(java.lang.Object), seeexprEquals(Expr, Expr).- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument (must not benull)- Returns:
- the boolean result expression
- See Also:
-
ne
The inequality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the!=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ne
The inequality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the!=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ne
The inequality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the!=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ne
The inequality operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the!=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
lt
The less-than operator. The arguments must be of the same type kind. This works equivalently to the<operator in Java for primitive values. This operation does not support reference values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
lt
The less-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
lt
The less-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
lt
The less-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
lt
The less-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
gt
The greater-than operator. The arguments must be of the same type kind. This works equivalently to the>operator in Java for primitive values. This operation does not support reference values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
gt
The greater-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
gt
The greater-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
gt
The greater-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
gt
The greater-than operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
le
The less-than-or-equals operator. The arguments must be of the same type kind. This works equivalently to the<=operator in Java for primitive values. This operation does not support reference values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
le
The less-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
le
The less-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
le
The less-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
le
The less-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the<=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ge
The greater-than-or-equals operator. The arguments must be of the same type kind. This works equivalently to the>=operator in Java for primitive values. This operation does not support reference values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ge
The greater-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ge
The greater-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ge
The greater-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
ge
The greater-than-or-equals operator. The second argument will be cast to the same type kind as the first argument. This works equivalently to the>=operator in Java for primitive values.- Parameters:
a- the left-hand argument (must not benull)b- the right-hand argument- Returns:
- the boolean result expression
-
cmp
The general comparison operator. The arguments must be of the same type kind.For primitives, this returns
-1,0, or1if the second argument is less than, equal to, or greater than the first argument, respectively.For reference values, this returns the result of natural-order comparisons using
Comparable.compareTo(Object). If the static type of either value does not implement this interface, the class will not verify.Comparisons between floating point values will have behavior equivalent to that of the
Float.compare(float, float)orDouble.compare(double, double)methods, particularly as this relates toNaNand negative-zero values.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the comparison result expression (not
null)
-
cmpl
The general comparison operator. This method behaves equivalently tocmp(io.quarkus.gizmo2.Expr, io.quarkus.gizmo2.Expr)in all respects, except that floating point value comparison will result in a-1if either value isNaN, and that negative zero is considered equal to positive zero.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the comparison result expression (not
null)
-
cmpg
The general comparison operator. This method behaves equivalently tocmp(io.quarkus.gizmo2.Expr, io.quarkus.gizmo2.Expr)in all respects, except that floating point value comparison will result in a1if either value isNaN, and that negative zero is considered equal to positive zero.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the comparison result expression (not
null)
-
and
The bitwiseandoperator. The arguments must be of the same type kind. This method works equivalently to the&operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
and
The bitwiseandoperator. This method works equivalently to the&operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
and
The bitwiseandoperator. This method works equivalently to the&operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
or
The bitwiseoroperator. The arguments must be of the same type kind. This method works equivalently to the|operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
or
The bitwiseoroperator. This method works equivalently to the|operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
or
The bitwiseoroperator. This method works equivalently to the|operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
xor
The bitwisexoroperator. The arguments must be of the same type kind. This method works equivalently to the^operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
xor
The bitwisexoroperator. This method works equivalently to the^operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
xor
The bitwisexoroperator. This method works equivalently to the^operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
complement
The bitwise complement operator. This method works equivalently to the~operator in Java.- Parameters:
a- the argument (must not benull)- Returns:
- the operation result (not
null)
-
shl
The bitwise left-shift operator. The arguments must be of the same type kind. This method works equivalently to the<<operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
shl
The bitwise left-shift operator. This method works equivalently to the<<operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
shl
The bitwise left-shift operator. This method works equivalently to the<<operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
shr
The bitwise signed-right-shift operator. The arguments must be of the same type kind. This method works equivalently to the>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
shr
The bitwise signed-right-shift operator. This method works equivalently to the>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
shr
The bitwise signed-right-shift operator. This method works equivalently to the>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
ushr
The bitwise unsigned-right-shift operator. The arguments must be of the same type kind. This method works equivalently to the>>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
ushr
The bitwise unsigned-right-shift operator. This method works equivalently to the>>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
ushr
The bitwise unsigned-right-shift operator. This method works equivalently to the>>>operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
add
The arithmetic addition operator. The arguments must be of the same type kind. This method works equivalently to the+operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
add
The arithmetic addition operator. This method works equivalently to the+operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
add
The arithmetic addition operator. This method works equivalently to the+operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
add
The arithmetic addition operator. This method works equivalently to the+operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
add
The arithmetic addition operator. This method works equivalently to the+operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. The arguments must be of the same type kind. This method works equivalently to the-operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
sub
The arithmetic subtraction operator. This method works equivalently to the-operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
mul
The arithmetic multiplication operator. The arguments must be of the same type kind. This method works equivalently to the*operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
mul
The arithmetic multiplication operator. This method works equivalently to the*operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
mul
The arithmetic multiplication operator. This method works equivalently to the*operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
mul
The arithmetic multiplication operator. This method works equivalently to the*operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
mul
The arithmetic multiplication operator. This method works equivalently to the*operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. The arguments must be of the same type kind. This method works equivalently to the/operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
div
The arithmetic division operator. This method works equivalently to the/operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. The arguments must be of the same type kind. This method works equivalently to the%operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argument (must not benull)b- the second argument- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
rem
The arithmetic remainder operator. This method works equivalently to the%operator in Java.- Parameters:
a- the first argumentb- the second argument (must not benull)- Returns:
- the operation result (not
null)
-
neg
The arithmetic negation operator. This method works equivalently to the-unary operator in Java.- Parameters:
a- the argument- Returns:
- the operation result (must not be
null)
-
addAssign
Add the argument to the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
subAssign
Subtract the argument from the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
mulAssign
Multiply the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
divAssign
Divide the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
remAssign
Divide the argument with the variable value and assign the remainder back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
andAssign
Bitwise-AND the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
orAssign
Bitwise-OR the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
xorAssign
Bitwise-XOR (exclusive OR) the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
shlAssign
Bitwise-left-shift the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
shrAssign
Arithmetically bitwise-right-shift the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
ushrAssign
Logically bitwise-right-shift the argument with the variable value and assign it back.- Parameters:
var- the variable (must not benull)arg- the argument value (must not benull)
-
logicalNot
Returns an expression which is the logical (boolean) opposite of the input expression.- Parameters:
a- the input expression (must not benull)- Returns:
- an expression which is the logical (boolean) opposite of the input expression
-
logicalOr
Perform a short-circuiting logical-OR operation (the||operator).- Parameters:
cond- the condition to evaluate (must not benull)other- the expression to evaluate ifcondisfalse- Returns:
- the boolean result of the operation (not
null)
-
logicalAnd
Perform a short-circuiting logical-AND operation (the&&operator).- Parameters:
cond- the condition to evaluate (must not benull)other- the expression to evaluate ifcondistrue- Returns:
- the boolean result of the operation (not
null)
-
cond
default Expr cond(Class<?> type, Expr cond, Consumer<BlockCreator> ifTrue, Consumer<BlockCreator> ifFalse) Evaluate a conditional expression (the?:operator).- Parameters:
type- the result type (must not benull)cond- the boolean condition to evaluate (must not benull)ifTrue- the expression to yield if the value wastrue(must not benull)ifFalse- the expression to yield if the value wasfalse(must not benull)- Returns:
- the result value (must not be
null)
-
cond
Evaluate a conditional expression (the?:operator).- Parameters:
type- the result type (must not benull)cond- the boolean condition to evaluate (must not benull)ifTrue- the expression to yield if the value wastrue(must not benull)ifFalse- the expression to yield if the value wasfalse(must not benull)- Returns:
- the result value (must not be
null)
-
lambda
Construct a lambda instance with the given type.Note that all values used in the lambda but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
type- the type of the lambda (must not benull)builder- the builder for the lambda body (must not benull)- Returns:
- the lambda object (not
null)
-
lambda
Construct a lambda instance with the given type.Note that all values used in the lambda but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
sam- the descriptor of the single abstract method of the lambda (must not benull)builder- the builder for the lambda body (must not benull)- Returns:
- the lambda object (not
null)
-
lambda
Construct a lambda instance with the given type.Note that all values used in the lambda but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
sam- the descriptor of the single abstract method of the lambda (must not benull)owner- the type of the final lambda (must not benull)builder- the builder for the lambda body (must not benull)- Returns:
- the lambda object (not
null)
-
newAnonymousClass
Expr newAnonymousClass(ConstructorDesc superCtor, List<? extends Expr> args, Consumer<AnonymousClassCreator> builder) Create a new anonymous class instance. Unlike Java anonymous classes, the anonymous class definition created here may implement additional interfaces. The type of the returned instance is the anonymous class type.Note that all values used in the anonymous class but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
superCtor- the superclass constructor to invoke (must not benull)args- the constructor arguments (must not benull)builder- the builder for the anonymous class (must not benull)- Returns:
- the anonymous class instance (not
null)
-
newAnonymousClass
Create a new anonymous class instance which implements the given interface. The type of the returned instance is the anonymous class type.Note that all values used in the anonymous class but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
interface_- the interface to implement (must not benull)builder- the builder for the anonymous class (must not benull)- Returns:
- the anonymous class instance (not
null)
-
newAnonymousClass
Create a new anonymous class instance which extends the given class or implements the given interface. If the given supertype is a class, it has to have a zero-parameter constructor. The type of the returned instance is the anonymous class type.Note that all values used in the anonymous class but created outside of it, including
this, must be captured usingCapturingCreator.capture(String, Expr)orCapturingCreator.capture(Var).- Parameters:
supertype- the supertype to extend or implement (must not benull)builder- the builder for the anonymous class (must not benull)- Returns:
- the anonymous class instance (not
null)
-
cast
Cast a value to the given type. For primitives, the appropriate conversion is applied. For objects, a class cast is performed.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
cast
Cast a value to the given type. For primitives, the appropriate conversion is applied. For objects, a class cast is performed.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
cast
Cast a value to the given type. For primitives, the appropriate conversion is applied. For objects, a class cast is performed.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
uncheckedCast
Cast an object value to the given type without a type check. If the cast is invalid, then class validation will fail.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
uncheckedCast
Cast an object value to the given type without a type check. If the cast is invalid, then class validation will fail.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
uncheckedCast
Cast an object value to the given type without a type check. If the cast is invalid, then class validation will fail.- Parameters:
a- the value to cast (must not benull)toType- the type to cast to (must not benull)- Returns:
- the cast value (not
null) - See Also:
-
box
Box the given primitive value into its corresponding box type.- Parameters:
a- the primitive value (must not benull)- Returns:
- the boxed value (not
null)
-
unbox
Unbox the given boxed value into its corresponding primitive type.- Parameters:
a- the boxed value (must not benull)- Returns:
- the primitive value (not
null)
-
instanceOf
Test whether the given object implements the given type.- Parameters:
obj- the object to test (must not benull)type- the type to test against (must not benull)- Returns:
- the boolean result of the check (not
null)
-
instanceOf
Test whether the given object implements the given type.- Parameters:
obj- the object to test (must not benull)type- the type to test against (must not benull)- Returns:
- the boolean result of the check (not
null)
-
instanceOf
Test whether the given object implements the given type.- Parameters:
obj- the object to test (must not benull)type- the type to test against (must not benull)- Returns:
- the boolean result of the check (not
null)
-
new_
Construct a new instance.- Parameters:
genericType- the generic type of the new object (must not benull)ctor- the constructor to call (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
ctor- the constructor to call (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
ctor- the constructor to call (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
ctor- the constructor to call (must not benull)arg0- the sole arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
ctor- the constructor to call (must not benull)arg0- the first argument to pass to the constructor (must not benull)arg1- the second argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
ctor- the constructor to call (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the sole argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the first argument to pass to the constructor (must not benull)arg1- the second argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the sole argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the first argument to pass to the constructor (must not benull)arg1- the second argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the sole argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)arg0- the first argument to pass to the constructor (must not benull)arg1- the second argument to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
new_
Construct a new instance.- Parameters:
type- the type to construct (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the new object (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
genericReturnType- the generic return type (must not benull)method- the method to call (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
method- the method to call (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
method- the method to call (must not benull)- Returns:
- the method call result (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
method- the method to call (must not benull)arg0- the sole argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
method- the method to call (must not benull)arg0- the first argument to pass to the method (must not benull)arg1- the second argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeStatic
Invoke a static method.- Parameters:
method- the method to call (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Expr invokeVirtual(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a virtual method.- Parameters:
genericReturnType- the generic return type (must not benull)method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Invoke a virtual method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Invoke a virtual method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Invoke a virtual method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the sole argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Invoke a virtual method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the first argument to pass to the method (must not benull)arg1- the second argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeVirtual
Invoke a virtual method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Expr invokeSpecial(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke a method using "special" semantics.- Parameters:
genericReturnType- the generic return type (must not benull)method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a method using "special" semantics.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a method using "special" semantics.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a method using "special" semantics.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the sole argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a method using "special" semantics.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the first argument to pass to the method (must not benull)arg1- the second argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a method using "special" semantics.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeSpecial
Invoke a constructor using "special" semantics.- Parameters:
ctor- the constructor to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the constructor call result (not
null, usuallyConst.ofVoid())
-
invokeSpecial
Invoke a constructor using "special" semantics.- Parameters:
ctor- the constructor to call (must not benull)instance- the invocation target (must not benull)- Returns:
- the constructor call result (not
null, usuallyConst.ofVoid())
-
invokeSpecial
Invoke a constructor using "special" semantics.- Parameters:
ctor- the constructor to call (must not benull)instance- the invocation target (must not benull)arg0- the sole argument to pass to the constructor (must not benull)- Returns:
- the constructor call result (not
null, usuallyConst.ofVoid())
-
invokeSpecial
Invoke a constructor using "special" semantics.- Parameters:
ctor- the constructor to call (must not benull)instance- the invocation target (must not benull)arg0- the first argument to pass to the constructor (must not benull)arg1- the second argument to pass to the constructor (must not benull)- Returns:
- the constructor call result (not
null, usuallyConst.ofVoid())
-
invokeSpecial
Invoke a constructor using "special" semantics.- Parameters:
ctor- the constructor to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the constructor (must not benull)- Returns:
- the constructor call result (not
null, usuallyConst.ofVoid())
-
invokeInterface
Expr invokeInterface(GenericType genericReturnType, MethodDesc method, Expr instance, List<? extends Expr> args) Invoke an interface method.- Parameters:
genericReturnType- the generic return type (must not benull)method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeInterface
Invoke an interface method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeInterface
Invoke an interface method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)- Returns:
- the method call result (not
null)
-
invokeInterface
Invoke an interface method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the sole argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeInterface
Invoke an interface method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)arg0- the first argument to pass to the method (must not benull)arg1- the second argument to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeInterface
Invoke an interface method.- Parameters:
method- the method to call (must not benull)instance- the invocation target (must not benull)args- the arguments to pass to the method (must not benull)- Returns:
- the method call result (not
null)
-
invokeDynamic
-
invokeDynamic
-
forEach
Build a for-each loop over an array or collection.- Parameters:
items- the array or collection (must not benull)builder- the builder for the loop body (must not benull)
-
block
Create a nested block.- Parameters:
nested- the builder for the block body (must not benull)
-
blockExpr
Create a block expression of giventype. The block mustyield(Expr)its result.- Parameters:
type- the output type (must not benull)nested- the builder for the block body (must not benull)- Returns:
- the returned value (not
null)
-
blockExpr
Create a block expression of giventype. The block mustyield(Expr)its result.- Parameters:
type- the output type (must not benull)nested- the builder for the block body (must not benull)- Returns:
- the returned value (not
null)
-
ifInstanceOf
default void ifInstanceOf(Expr obj, Class<?> type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue) If the given object is an instance of the given type, then execute the block with the narrowed object.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifTrue- the builder for a block to run if the type was successfully narrowed (must not benull)
-
ifInstanceOf
If the given object is an instance of the given type, then execute the block with the narrowed object.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifTrue- the builder for a block to run if the type was successfully narrowed (must not benull)
-
ifNotInstanceOf
If the given object is not an instance of the given type, then execute the given block.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifFalse- the builder for a block to run if the type did not match (must not benull)
-
ifNotInstanceOf
If the given object is not an instance of the given type, then execute the given block.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifFalse- the builder for a block to run if the type did not match (must not benull)
-
ifInstanceOfElse
default void ifInstanceOfElse(Expr obj, Class<?> type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue, Consumer<BlockCreator> ifFalse) If the given object is an instance of the given type, then execute the first block with the narrowed object, otherwise execute the other block.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifTrue- the builder for a block to run if the type was successfully narrowed (must not benull)ifFalse- the builder for a block to run if the type did not match (must not benull)
-
ifInstanceOfElse
void ifInstanceOfElse(Expr obj, ClassDesc type, BiConsumer<BlockCreator, ? super LocalVar> ifTrue, Consumer<BlockCreator> ifFalse) If the given object is an instance of the given type, then execute the first block with the narrowed object, otherwise execute the other block.- Parameters:
obj- the object to test (must not benull)type- the type to check for (must not benull)ifTrue- the builder for a block to run if the type was successfully narrowed (must not benull)ifFalse- the builder for a block to run if the type did not match (must not benull)
-
if_
A generalifconditional.- Parameters:
cond- the boolean condition expression (must not benull)whenTrue- the builder for a block to execute if the condition is true (must not benull)
-
ifNot
An invertedifconditional.- Parameters:
cond- the boolean condition expression (must not benull)whenFalse- the builder for a block to execute if the condition is false (must not benull)
-
ifElse
A generalif-elseconditional.- Parameters:
cond- the boolean condition expression (must not benull)whenTrue- the builder for a block to execute if the condition is true (must not benull)whenFalse- the builder for a block to execute if the condition is false (must not benull)
-
ifNull
Anif (obj == null)conditional.- Parameters:
obj- the object reference to test (must not benull)whenTrue- the builder for a block to execute if the object reference is null (must not benull)
-
ifNotNull
Anif (obj != null)conditional.- Parameters:
obj- the object reference to test (must not benull)whenTrue- the builder for a block to execute if the object reference is not null (must not benull)
-
switchEnum
Construct aswitchstatement forenumconstants.- Parameters:
val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)
-
switchEnum
Construct aswitchexpression forenumconstants.- Parameters:
outputType- the output type of thisswitch(must not benull)val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)- Returns:
- the switch expression result (not
null)
-
switchEnum
Construct aswitchexpression forenumconstants.- Parameters:
outputType- the output type of thisswitch(must not benull)val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)- Returns:
- the switch expression result (not
null)
-
switch_
Construct aswitchstatement. The type of the switch value must be of one of these supported types:int(which includesbyte,char,short, andboolean)longjava.lang.Stringjava.lang.Class
switchcreator depends on the type of the value. Forenumswitches, useswitchEnum(Expr, Consumer).- Parameters:
val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)
-
switch_
Construct aswitchexpression. The type of the switch value must be of one of these supported types:int(which includesbyte,char,short, andboolean)longjava.lang.Stringjava.lang.Class
switchcreator depends on the type of the value. Forenumswitches, useswitchEnum(Expr, Consumer).- Parameters:
outputType- the output type of thisswitch(must not benull)val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)- Returns:
- the switch expression result (not
null)
-
switch_
Construct aswitchexpression. The type of the switch value must be of one of these supported types:int(which includesbyte,char,short, andboolean)longjava.lang.Stringjava.lang.Class
switchcreator depends on the type of the value. Forenumswitches, useswitchEnum(Expr, Consumer).- Parameters:
outputType- the output type of thisswitch(must not benull)val- the value to switch on (must not benull)builder- the builder for theswitchstatement (must not benull)- Returns:
- the switch expression result (not
null)
-
break_
- Parameters:
outer- the block to break (must not benull)
-
continue_
Resume the next iteration of an enclosing loop. A block creator is a loop if it was created using one of: To repeat an iteration, seegoto_(BlockCreator).- Parameters:
loop- the loop to continue (must not benull)- Throws:
IllegalArgumentException- if the given block creator does not correspond to a loop
-
goto_
Jump to the start of the given enclosing block. Blocks which are part of an expression-accepting operation may not be the target ofgoto_.- Parameters:
outer- the block to restart (must not benull)
-
gotoStart
default void gotoStart()Jump to the start of this block. -
gotoCase
Jump to a specific case in the given enclosingswitch. If the case is not represented in theswitch, then it will be as ifgotoDefault(SwitchCreator)was called instead.- Parameters:
switch_- the enclosingswitch(must not benull)case_- the constant representing the case to go to (must not benull)
-
gotoCase
Jump to a specific case in the given enclosingswitch. If the case is not represented in theswitch, then it will be as ifgotoDefault(SwitchCreator)was called instead.- Parameters:
switch_- the enclosingswitch(must not benull)case_- the constant representing the case to go to (must not benull)
-
gotoCase
Jump to a specific case in the given enclosingswitch. If the case is not represented in theswitch, then it will be as ifgotoDefault(SwitchCreator)was called instead.- Parameters:
switch_- the enclosingswitch(must not benull)case_- the constant representing the case to go to (must not benull)
-
gotoCase
Jump to a specific case in the given enclosingswitch. If the case is not represented in theswitch, then it will be as ifgotoDefault(SwitchCreator)was called instead.- Parameters:
switch_- the enclosingswitch(must not benull)case_- the constant representing the case to go to (must not benull)
-
gotoCase
Jump to a specific case in the given enclosingswitch. If the case is not represented in theswitch, then it will be as ifgotoDefault(SwitchCreator)was called instead.- Parameters:
switch_- the enclosingswitch(must not benull)case_- the constant representing the case to go to (must not benull)
-
gotoDefault
Jump to the default case in the given enclosingswitch.- Parameters:
switch_- the enclosingswitch(must not benull)
-
loop
Enter a loop. The loop may be exited by callingbreak_(BlockCreator)on the loop's block.- Parameters:
body- the loop body (must not benull)
-
while_
Enter awhileloop. The loop may be exited early by callingbreak_(BlockCreator)on the loop's block.- Parameters:
cond- the condition which is evaluated at the top of the block (must not benull)body- the loop body (must not benull)
-
doWhile
Enter ado-whileloop. The loop may be exited early by callingbreak_(BlockCreator)on the loop's block.- Parameters:
body- the loop body (must not benull)cond- the condition which is evaluated at the bottom of the block (must not benull)
-
try_
Enter atryblock.- Parameters:
body- the handler to produce thetry,catch, and/orfinallysections
-
autoClose
Open a resource and run the given body with the resource, automatically closing it at the end.- Parameters:
resource- the resource to automatically close (must not benull)body- the creator for the body of the resource operation (must not benull)
-
autoClose
Open a resource and run the given body with the resource, automatically closing it at the end.- Parameters:
resource- the resource to automatically close (must not benull)body- the creator for the body of the resource operation (must not benull)
-
synchronized_
Create asynchronizedblock. When the givenbodyis executed, the monitor of givenmonitoris locked.- Parameters:
monitor- the expression of the object whose monitor is to be locked (must not benull)body- the creator for the body of the block (must not benull)
-
locked
- Parameters:
jucLock- the expression of the lock object to be locked (must not benull)body- the creator for the body of the block (must not benull)
-
return_
void return_()Return from the current method. -
return_
Return from the current method.- Parameters:
val- the return value (must not benull)
-
return_
Return from the current method.- Parameters:
val- the return value (must not benull)
-
return_
Return from the current method.- Parameters:
val- the return value (must not benull)
-
return_
default void return_(boolean val) Return from the current method.- Parameters:
val- the return value
-
return_
default void return_(int val) Return from the current method.- Parameters:
val- the return value
-
returnTrue
default void returnTrue()Returntruefrom the current method. -
returnFalse
default void returnFalse()Returnfalsefrom the current method. -
returnIntZero
default void returnIntZero()Return0from the current method. -
returnNull
void returnNull()Returnnullfrom the current method. -
throw_
Throw the given exception object.- Parameters:
val- the exception object (must not benull)
-
throw_
Throw a new exception of the given type.- Parameters:
type- the exception type (must not benull)
-
throw_
Throw a new exception of the given type with a message.- Parameters:
type- the exception type (must not benull)message- the message (must not benull)
-
throw_
Throw a new exception of the given type with a message.- Parameters:
type- the exception type (must not benull)message- the message (must not benull)
-
throw_
Throw a new exception of the given type.- Parameters:
type- the exception type (must not benull)
-
throw_
Throw a new exception of the given type with a message.- Parameters:
type- the exception type (must not benull)message- the message
-
throw_
Throw a new exception of the given type with a message.- Parameters:
type- the exception type (must not benull)message- the message
-
exprHashCode
Generates call to one of the static methods to compute a hash code of given expression. That is:- for reference types,
Objects.hashCode(expr) - for primitive types, the static
hashCode(expr)method on the corresponding wrapper class
- Parameters:
expr- the expression, which can be of any type (must not benull)- Returns:
- an
intexpression representing the hash code of given expression (notnull)
- for reference types,
-
objHashCode
Deprecated.useexprHashCode(Expr)instead.- Parameters:
expr- the expression, which can be of any type (must not benull)- Returns:
- an
intexpression representing the hash code of given expression (notnull)
-
exprEquals
Generates call to theObjects#equals(a, b)method if at least one of the given expressions is of a reference type (boxing the other if primitive). If both expressions are of a primitive type, this is equivalent toeq(Expr, Expr).- Parameters:
a- the first expression (must not benull)b- the second expression (must not benull)- Returns:
- a
booleanexpression representing the equality between the two values (notnull)
-
objEquals
Deprecated.useexprEquals(Expr, Expr)instead.- Parameters:
a- the first expression (must not benull)b- the second expression (must not benull)- Returns:
- a
booleanexpression representing the equality between the two values (notnull)
-
exprToString
Generates call to one of theString#valueOf(expr)overloads, based on the type of the argument.- Parameters:
expr- the expression, which can be of any type- Returns:
- a
Stringexpression representing the string value of given expression (notnull)
-
objToString
Deprecated.useexprToString(Expr)instead.- Parameters:
expr- the expression, which can be of any type- Returns:
- a
Stringexpression representing the string value of given expression (notnull)
-
arrayHashCode
Generates call to one of theArrays#hashCode(expr)overloads, based on the type of the argument, or toArrays#deepHashCode(expr)in case of multidimensional arrays.- Parameters:
expr- the array instance (must not benull)- Returns:
- an
intexpression representing the hash code of given array (notnull)
-
arrayEquals
Generates call to one of theArrays#equals(a, b)overloads, based on the type of the first argument, or toArrays#deepEquals(a, b)in case of multidimensional arrays.- Parameters:
a- the first array instance (must not benull)b- the second array instance (must not benull)- Returns:
- a
booleanexpression representing the equality between the two arrays (notnull)
-
arrayToString
Generates call to one of theArrays#toString(expr)overloads, based on the type of the argument, or toArrays#deepToString(expr)in case of multidimensional arrays.- Parameters:
expr- the array instance (must not benull)- Returns:
- a
Stringexpression representing the string value of given array (notnull)
-
withObject
Returns a convenience wrapper for accessing instance methods ofObject. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Object
-
withClass
Returns a convenience wrapper for accessing instance methods ofClass. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Class
-
withString
Returns a convenience wrapper for accessing instance methods ofString. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
String
-
withCollection
Returns a convenience wrapper for accessing instance methods ofCollection. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Collection
-
withList
Returns a convenience wrapper for accessing instance methods ofList. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
List
-
withSet
Returns a convenience wrapper for accessing instance methods ofSet. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Set
-
withMap
Returns a convenience wrapper for accessing instance methods ofMap. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Map
-
withIterator
Returns a convenience wrapper for accessing instance methods ofIterator. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Iterator
-
withOptional
Returns a convenience wrapper for accessing instance methods ofOptional. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
receiver- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Optional
-
withThrowable
Returns a convenience wrapper for accessing instance methods ofThrowable. Note that the returned instance must not be reused; only a single method may be called on it.- Parameters:
throwable- the instance to invoke upon (must not benull)- Returns:
- a convenience wrapper for accessing instance methods of
Throwable
-
classForName
Generate a call toClass.forName(String)which uses the defining class loader of this class.- Parameters:
className- the class name (must not benull)- Returns:
- the loaded class expression (not
null)
-
listOf
Generate a call toList.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the list after mapping (must not benull)mapper- function that turns values of typeTinto expressions (must not benulland must not producenull)- Returns:
- the list expression (not
null) - See Also:
-
listOf
Generate a call toList.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the list (must not benull)- Returns:
- the list expression (not
null) - See Also:
-
listOf
Generate a call toList.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the list (must not benull)- Returns:
- the list expression (not
null) - See Also:
-
setOf
Generate a call toSet.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the set after mapping (must not benull)mapper- function that turns values of typeTinto expressions (must not benulland must not producenull)- Returns:
- the list expression (not
null) - See Also:
-
setOf
Generate a call toSet.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the list (must not benull)- Returns:
- the set expression (not
null) - See Also:
-
setOf
Generate a call toSet.of()or one of its variants, based on the number of arguments.- Parameters:
items- the items to add to the set (must not benull)- Returns:
- the set expression (not
null) - See Also:
-
mapOf
Generate a call toMap.of()or one of its variants, based on the number of arguments.- Parameters:
items- the keys and values from which the map is populated- Returns:
- map expression (not
null) - See Also:
-
mapOf
Generate a call toMap.of()or one of its variants, based on the number of arguments.- Parameters:
items- the keys and values from which the map is populated- Returns:
- map expression (not
null) - See Also:
-
mapEntry
Generate a call toMap.entry(Object, Object).- Parameters:
key- the key for the new entry (must not benull)value- the value for the new entry (must not benull)- Returns:
- the new map entry (not
null)
-
optionalOf
Generate a call toOptional.of(Object).- Parameters:
value- the expression to pass in to the call (must not benull)- Returns:
- optional expression (not
null) - See Also:
-
optionalOfNullable
Generate a call toOptional.ofNullable(Object).- Parameters:
value- the expression to pass in to the call (must not benull)- Returns:
- optional expression (not
null) - See Also:
-
optionalEmpty
Expr optionalEmpty()Generate a call toOptional.empty().- Returns:
- the empty optional expression (not
null)
-
iterate
Iterate the given target. In other words, generate a call toIterable.iterator().- Parameters:
items- the iterable object expression (must not benull)- Returns:
- the iterator expression (not
null)
-
currentThread
Expr currentThread()Returns an expression representing the current thread from the perspective of the running method body.- Returns:
- an expression representing the current thread from the perspective of the running method body
-
close
Close the given target.- Parameters:
closeable- the closeable object (must not benull)
-
line
void line(int lineNumber) Change the current line number from this point.- Parameters:
lineNumber- the line number
-
printf
Insert aprintfstatement.- Parameters:
format- the format string (must not benull)values- the value expression(s) (must not benull)
-
printf
Insert aprintfstatement.- Parameters:
format- the format string (must not benull)values- the value expression(s) (must not benull)
-
assert_
Produce an assertion.- Parameters:
assertion- the assertion expression maker (must not benull)message- the message to print if the assertion fails (must not benull)
-
exprEquals(Expr, Expr)instead.