Package jnr.ffi.util

Class AnnotationProperty

java.lang.Object
jnr.ffi.util.AnnotationProperty

final class AnnotationProperty extends Object
Describes an annotation property.
Version:
$Id$
  • Field Details

    • name

      private final String name
      The property name.
    • type

      private final Class<?> type
      The property type.
    • value

      private Object value
      The property value. This field can be mutable.
  • Constructor Details

    • AnnotationProperty

      public AnnotationProperty(String name, Class<?> type)
      Creates a new annotation property instance.
      Parameters:
      name - the property name.
      type - the property type.
  • Method Details

    • getName

      public String getName()
      Returns the property name.
      Returns:
      the property name.
    • getType

      public Class<?> getType()
      Returns the property type.
      Returns:
      the property type.
    • getValue

      public Object getValue()
      Returns the property value.
      Returns:
      the property value.
    • setValue

      public void setValue(Object value)
      Sets the property value.
      Parameters:
      value - the property value.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getValueHashCode

      protected int getValueHashCode()
      Calculates this annotation value hash code.
      Returns:
      this annotation value hash code.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • valueToString

      protected String valueToString()
      Calculates the toString of the property value.
      Returns:
      the toString of the property value.