Class ParamField


  • public class ParamField
    extends java.lang.Object
    This class stores metdata for Field annotation are used to map them to Param at runtime
    Since:
    Apache Tika 1.14
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT  
    • Constructor Summary

      Constructors 
      Constructor Description
      ParamField​(java.lang.reflect.AccessibleObject member)
      Creates a ParamField object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assignValue​(java.lang.Object bean, java.lang.Object value)
      Sets given value to the annotated field of bean
      java.lang.reflect.Field getField()  
      java.lang.String getName()  
      java.lang.reflect.Method getSetter()  
      java.lang.Class<?> getType()  
      boolean isRequired()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ParamField

        public ParamField​(java.lang.reflect.AccessibleObject member)
                   throws TikaConfigException
        Creates a ParamField object
        Parameters:
        member - a field or method which has Field annotation
        Throws:
        TikaConfigException
    • Method Detail

      • getField

        public java.lang.reflect.Field getField()
      • getSetter

        public java.lang.reflect.Method getSetter()
      • getName

        public java.lang.String getName()
      • getType

        public java.lang.Class<?> getType()
      • isRequired

        public boolean isRequired()
      • assignValue

        public void assignValue​(java.lang.Object bean,
                                java.lang.Object value)
                         throws java.lang.IllegalAccessException,
                                java.lang.reflect.InvocationTargetException
        Sets given value to the annotated field of bean
        Parameters:
        bean - bean with annotation for field
        value - value of field
        Throws:
        java.lang.IllegalAccessException - when it occurs
        java.lang.reflect.InvocationTargetException - when it occurs
      • toString

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