java.lang.Object
io.github.sugarcubes.cloner.bytecode.FieldSpec

public final class FieldSpec extends Object
Field of a generated class, or added to a class.
  • Constructor Details

    • FieldSpec

      public FieldSpec(int access, String name, String descriptor)
      Creates the field.
      Parameters:
      access - access flags (Modifier values)
      name - field name
      descriptor - field descriptor
    • FieldSpec

      public FieldSpec(int access, String name, String descriptor, Object constantValue)
      Creates a static final field with a constant value (the ConstantValue attribute).
      Parameters:
      access - access flags (Modifier values)
      name - field name
      descriptor - field descriptor
      constantValue - Integer, Long, Float, Double, String or null
  • Method Details

    • getAccess

      public int getAccess()
      Returns the access flags.
      Returns:
      access flags
    • getName

      public String getName()
      Returns the field name.
      Returns:
      field name
    • getDescriptor

      public String getDescriptor()
      Returns the field descriptor.
      Returns:
      field descriptor
    • getConstantValue

      public Object getConstantValue()
      Returns the constant value.
      Returns:
      constant value or null