接口 JavaField

所有超级接口:
JavaAnnotatedElement, JavaMember, JavaModel, Serializable
所有已知实现类:
DefaultJavaField

public interface JavaField extends JavaAnnotatedElement, JavaMember, JavaModel
Modeled equivalent of Field, providing the most important methods. Where the original Field is using an Array, this model is using a List.
  • 方法详细资料

    • getType

      JavaClass getType()
      Equivalent of Field.getType()
      返回:
      the type of this field, should never be null.
    • getCodeBlock

      String getCodeBlock()
      The in-code representation of this field.
      指定者:
      getCodeBlock 在接口中 JavaModel
      返回:
      the complete representation of this field
    • getInitializationExpression

      String getInitializationExpression()
      Get the original expression used to initialize the field.
      返回:
      initialization as string.
    • isEnumConstant

      boolean isEnumConstant()
      返回:
      true if this field is an enum constant, otherwise false
      从以下版本开始:
      2.0
    • getEnumConstantClass

      JavaClass getEnumConstantClass()
      返回:
      the classBody of the enum constant
      从以下版本开始:
      2.0
    • getEnumConstantArguments

      List<Expression> getEnumConstantArguments()
      返回:
      the arguments of the enum constant
      从以下版本开始:
      2.0