Class ClassOps

java.lang.Object
io.quarkus.gizmo2.creator.ops.ObjectOps
io.quarkus.gizmo2.creator.ops.ClassOps

public final class ClassOps extends ObjectOps
Operations on Class.
  • Constructor Details

    • ClassOps

      public ClassOps(BlockCreator bc, Expr clazz)
      Construct a new instance.
      Parameters:
      bc - the block creator (must not be null)
      clazz - the receiver class (must not be null)
  • Method Details

    • getName

      public Expr getName()
      Generate a call to Class.getName().
      Returns:
      the expression of the result (not null)
    • isInterface

      public Expr isInterface()
      Generate a call to Class.isInterface().
      Returns:
      the expression of the result (not null)
    • getClassLoader

      public Expr getClassLoader()
      Generate a call to Class.getClassLoader().
      Returns:
      the expression of the result (not null)
    • asSubclass

      public Expr asSubclass(Expr subclass)
      Generate a call to Class.asSubclass(Class).
      Parameters:
      subclass - the expression of the subclass Class object (must not be null)
      Returns:
      the expression of the result (not null)
    • asSubclass

      public Expr asSubclass(Class<?> clazz)
      Generate a call to Class.asSubclass(Class).
      Parameters:
      clazz - the subclass Class object (must not be null)
      Returns:
      the expression of the result (not null)
    • cast

      public Expr cast(Expr object)
      Generate a call to Class.cast(Object).
      Parameters:
      object - the expression of the object to cast (must not be null)
      Returns:
      the expression of the result (not null)