Package jnr.ffi.util

Class AnnotationProperty


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

      Fields 
      Modifier and Type Field Description
      private java.lang.String name
      The property name.
      private java.lang.Class<?> type
      The property type.
      private java.lang.Object value
      The property value.
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationProperty​(java.lang.String name, java.lang.Class<?> type)
      Creates a new annotation property instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      java.lang.String getName()
      Returns the property name.
      java.lang.Class<?> getType()
      Returns the property type.
      java.lang.Object getValue()
      Returns the property value.
      protected int getValueHashCode()
      Calculates this annotation value hash code.
      int hashCode()
      void setValue​(java.lang.Object value)
      Sets the property value.
      java.lang.String toString()
      protected java.lang.String valueToString()
      Calculates the toString of the property value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
        The property name.
      • type

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

        private java.lang.Object value
        The property value. This field can be mutable.
    • Constructor Detail

      • AnnotationProperty

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

      • getName

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

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

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

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

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

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

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