Class FieldDescription.Token

    • Field Detail

      • name

        private final java.lang.String name
        The name of the represented field.
      • modifiers

        private final int modifiers
        The modifiers of the represented field.
      • annotations

        private final java.util.List<? extends AnnotationDescription> annotations
        The annotations of the represented field.
    • Constructor Detail

      • Token

        public Token​(java.lang.String name,
                     int modifiers,
                     TypeDescription.Generic type)
        Creates a new field token without annotations. The field type must be represented in its detached form.
        Parameters:
        name - The name of the represented field.
        modifiers - The modifiers of the represented field.
        type - The type of the represented field.
      • Token

        public Token​(java.lang.String name,
                     int modifiers,
                     TypeDescription.Generic type,
                     java.util.List<? extends AnnotationDescription> annotations)
        Creates a new field token. The field type must be represented in its detached form.
        Parameters:
        name - The name of the represented field.
        modifiers - The modifiers of the represented field.
        type - The type of the represented field.
        annotations - The annotations of the represented field.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the represented field.
        Returns:
        The name of the represented field.
      • getType

        public TypeDescription.Generic getType()
        Returns the type of the represented field.
        Returns:
        The type of the represented field.
      • getModifiers

        public int getModifiers()
        Returns the modifiers of the represented field.
        Returns:
        The modifiers of the represented field.
      • getAnnotations

        public AnnotationList getAnnotations()
        Returns the annotations of the represented field.
        Returns:
        The annotations of the represented field.
      • asSignatureToken

        public FieldDescription.SignatureToken asSignatureToken​(TypeDescription declaringType)
        Creates a signature token that represents the method that is represented by this token.
        Parameters:
        declaringType - The declaring type of the field that this token represents.
        Returns:
        A signature token representing this token.
      • hashCode

        @Enhance("hashCode")
        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object