Class ObjectOps

java.lang.Object
io.quarkus.gizmo2.creator.ops.ObjectOps
Direct Known Subclasses:
ClassOps, CollectionOps, IteratorOps, MapOps, OptionalOps, StringBuilderOps, StringOps, ThrowableOps

public class ObjectOps extends Object
Operations on Object.
  • Constructor Details

    • ObjectOps

      public ObjectOps(BlockCreator bc, Expr obj)
      Construct a new instance.
      Parameters:
      bc - the block creator (must not be null)
      obj - the receiver object (must not be null)
    • ObjectOps

      protected ObjectOps(Class<?> receiverType, BlockCreator bc, Expr obj)
      Construct a new subclass instance.
      Parameters:
      receiverType - the type of the receiver (must not be null)
      bc - the block creator (must not be null)
      obj - the receiver object (must not be null)
  • Method Details

    • receiverType

      protected Class<?> receiverType()
      Returns the receiver type.
      Returns:
      the receiver type
    • blockCreator

      protected BlockCreator blockCreator()
      Returns the block creator.
      Returns:
      the block creator
    • receiver

      protected Expr 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 be null)
      name - the method name (must not be null)
      param0Type - the first parameter type (must not be null)
      param1Type - the second parameter type (must not be null)
      param2Type - the third parameter type (must not be null)
      arg0 - the first argument value (must not be null)
      arg1 - the second argument value (must not be null)
      arg2 - the third argument value (must not be null)
      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 be null)
      name - the method name (must not be null)
      param0Type - the first parameter type (must not be null)
      param1Type - the second parameter type (must not be null)
      arg0 - the first argument value (must not be null)
      arg1 - the second argument value (must not be null)
      Returns:
      the invocation result expression (not null)
    • invokeInstance

      protected Expr invokeInstance(Class<?> returnType, String name, Class<?> paramType, Expr arg)
      Perform an instance invocation of a method with 1 parameter.
      Parameters:
      returnType - the return type (must not be null)
      name - the method name (must not be null)
      paramType - the parameter type (must not be null)
      arg - the argument value (must not be null)
      Returns:
      the invocation result expression (not null)
    • invokeInstance

      protected Expr invokeInstance(Class<?> returnType, String name)
      Perform an instance invocation of a method with no parameter.
      Parameters:
      returnType - the return type (must not be null)
      name - the method name (must not be null)
      Returns:
      the invocation result expression (not null)
    • invokeInstance

      protected void invokeInstance(String name)
      Perform an instance invocation of a method with no parameter that returns void.
      Parameters:
      name - the method name (must not be null)
    • getClass_

      public Expr getClass_()
      Generate a call to Object.getClass().
      Returns:
      the expression of the result (not null)
    • toString_

      public Expr toString_()
      Generate a call to Object.toString(). For a null-safe variation, use BlockCreator.objToString(Expr).
      Returns:
      the expression of the result (not null)
    • equals_

      public Expr equals_(Expr otherObj)
      Generate a call to Object.equals(Object). For a null-safe variation, use BlockCreator.objEquals(Expr, Expr).
      Parameters:
      otherObj - the object to compare (must not be null)
      Returns:
      the expression of the result (not null)
    • hashCode_

      public Expr hashCode_()
      Generate a call to Object.hashCode(). For a null-safe variation, use BlockCreator.objHashCode(Expr).
      Returns:
      the expression of the result (not null)