java.lang.Object
io.quarkus.gizmo2.creator.ops.ObjectOps
- Direct Known Subclasses:
ClassOps,CollectionOps,IteratorOps,MapOps,OptionalOps,StringBuilderOps,StringOps,ThrowableOps
Operations on
Object.-
Constructor Summary
ConstructorsModifierConstructorDescriptionObjectOps(BlockCreator bc, Expr obj) Construct a new instance.protectedObjectOps(Class<?> receiverType, BlockCreator bc, Expr obj) Construct a new subclass instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected BlockCreatorReturns the block creator.Generate a call toObject.equals(Object).Generate a call toObject.getClass().Generate a call toObject.hashCode().protected ExprinvokeInstance(Class<?> returnType, String name) Perform an instance invocation of a method with no parameter.protected ExprinvokeInstance(Class<?> returnType, String name, Class<?> paramType, Expr arg) Perform an instance invocation of a method with 1 parameter.protected ExprinvokeInstance(Class<?> returnType, String name, Class<?> param0Type, Class<?> param1Type, Expr arg0, Expr arg1) Perform an instance invocation of a method with 2 parameters.protected ExprinvokeInstance(Class<?> returnType, String name, Class<?> param0Type, Class<?> param1Type, Class<?> param2Type, Expr arg0, Expr arg1, Expr arg2) Perform an instance invocation of a method with 3 parameters.protected voidinvokeInstance(String name) Perform an instance invocation of a method with no parameter that returnsvoid.protected Exprreceiver()Returns the receiver object expression.protected Class<?>Returns the receiver type.Generate a call toObject.toString().
-
Constructor Details
-
ObjectOps
Construct a new instance.- Parameters:
bc- the block creator (must not benull)obj- the receiver object (must not benull)
-
ObjectOps
Construct a new subclass instance.- Parameters:
receiverType- the type of the receiver (must not benull)bc- the block creator (must not benull)obj- the receiver object (must not benull)
-
-
Method Details
-
receiverType
Returns the receiver type.- Returns:
- the receiver type
-
blockCreator
Returns the block creator.- Returns:
- the block creator
-
receiver
Returns the receiver object expression.- Returns:
- the receiver object expression
-
invokeInstance
protected Expr invokeInstance(Class<?> returnType, String name, Class<?> param0Type, Class<?> param1Type, Class<?> param2Type, Expr arg0, Expr arg1, Expr arg2) Perform an instance invocation of a method with 3 parameters.- Parameters:
returnType- the return type (must not benull)name- the method name (must not benull)param0Type- the first parameter type (must not benull)param1Type- the second parameter type (must not benull)param2Type- the third parameter type (must not benull)arg0- the first argument value (must not benull)arg1- the second argument value (must not benull)arg2- the third argument value (must not benull)- Returns:
- the invocation result expression (not
null)
-
invokeInstance
protected Expr invokeInstance(Class<?> returnType, String name, Class<?> param0Type, Class<?> param1Type, Expr arg0, Expr arg1) Perform an instance invocation of a method with 2 parameters.- Parameters:
returnType- the return type (must not benull)name- the method name (must not benull)param0Type- the first parameter type (must not benull)param1Type- the second parameter type (must not benull)arg0- the first argument value (must not benull)arg1- the second argument value (must not benull)- Returns:
- the invocation result expression (not
null)
-
invokeInstance
Perform an instance invocation of a method with 1 parameter.- Parameters:
returnType- the return type (must not benull)name- the method name (must not benull)paramType- the parameter type (must not benull)arg- the argument value (must not benull)- Returns:
- the invocation result expression (not
null)
-
invokeInstance
Perform an instance invocation of a method with no parameter.- Parameters:
returnType- the return type (must not benull)name- the method name (must not benull)- Returns:
- the invocation result expression (not
null)
-
invokeInstance
Perform an instance invocation of a method with no parameter that returnsvoid.- Parameters:
name- the method name (must not benull)
-
getClass_
Generate a call toObject.getClass().- Returns:
- the expression of the result (not
null)
-
toString_
Generate a call toObject.toString(). For anull-safe variation, useBlockCreator.objToString(Expr).- Returns:
- the expression of the result (not
null)
-
equals_
Generate a call toObject.equals(Object). For anull-safe variation, useBlockCreator.objEquals(Expr, Expr).- Parameters:
otherObj- the object to compare (must not benull)- Returns:
- the expression of the result (not
null)
-
hashCode_
Generate a call toObject.hashCode(). For anull-safe variation, useBlockCreator.objHashCode(Expr).- Returns:
- the expression of the result (not
null)
-