Interface FieldDesc

All Superinterfaces:
MemberDesc, SimpleTyped, Typed

public sealed interface FieldDesc extends MemberDesc, SimpleTyped
A descriptor for a field.
  • Method Details

    • of

      static FieldDesc of(ClassDesc owner, String name, ClassDesc type)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the field (must not be null)
      name - the name of the field (must not be null)
      type - the descriptor of the field type (must not be null)
      Returns:
      the field descriptor (not null)
    • of

      static FieldDesc of(ClassDesc owner, String name, Class<?> type)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the field (must not be null)
      name - the name of the field (must not be null)
      type - the field type (must not be null)
      Returns:
      the field descriptor (not null)
    • of

      static FieldDesc of(Class<?> owner, String name)
      Construct a new instance.
      Parameters:
      owner - the class which contains the field (must not be null)
      name - the name of the field (must not be null)
      Returns:
      the field descriptor (not null)
    • of

      static FieldDesc of(Field field)
      Returns a field descriptor for the given field.
      Parameters:
      field - the field (must not be null)
      Returns:
      a field descriptor for the given field
    • type

      ClassDesc type()
      Returns the descriptor of the field type.
      Specified by:
      type in interface MemberDesc
      Specified by:
      type in interface SimpleTyped
      Specified by:
      type in interface Typed
      Returns:
      the descriptor of the field type