Class ClassRef

java.lang.Object
ch.raffael.meldioc.model.ClassRef

@Immutable(builder=false) public abstract class ClassRef extends Object
Named reference to a Java class.
  • Method Details

    • of

      public static ClassRef of(String packageName, String className)
    • of

      public static ClassRef of(Class<?> clazz)
    • packageName

      @Parameter public abstract String packageName()
    • className

      @Parameter public abstract String className()
    • arrayDimensions

      @Default public int arrayDimensions()
    • asArray

      public final ClassRef asArray()
    • isPrimitive

      public final boolean isPrimitive()
    • binaryName

      public final String binaryName()
    • canonicalName

      public final String canonicalName()
    • simpleName

      public final String simpleName()
    • withPackageName

      ClassRef withPackageName(String value)
      Copy the current immutable object by setting a value for the packageName attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for packageName
      Returns:
      A modified copy of the this object
    • withClassName

      ClassRef withClassName(String value)
      Copy the current immutable object by setting a value for the className attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for className
      Returns:
      A modified copy of the this object
    • withArrayDimensions

      ClassRef withArrayDimensions(int value)
      Copy the current immutable object by setting a value for the arrayDimensions attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for arrayDimensions
      Returns:
      A modified copy of the this object