Class Property

    • Constructor Detail

      • Property

        public Property​(com.google.inject.Module module,
                        String name,
                        Class<?> type,
                        Method getter,
                        Method setter,
                        Iterable<Annotation> annotations)
        Constructs a Property .
        Parameters:
        module - the module
        name - the name
        type - the type
        getter - the getter method
        setter - the setter method
        annotations - the annotations
    • Method Detail

      • setInfo

        public void setInfo​(String info)
        Sets the info.
        Parameters:
        info - the info to set
        See Also:
        getInfo()
      • getOrder

        public int getOrder()
        Returns the order.
        Returns:
        the order
        See Also:
        setOrder(int)
      • setOrder

        public void setOrder​(int order)
        Sets the order.
        Parameters:
        order - the order to set
        See Also:
        getOrder()
      • getName

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

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

        public Method getGetter()
        Returns the getter method.
        Returns:
        the getter
      • getSetter

        public Method getSetter()
        Returns the setter method.
        Returns:
        the setter
      • addRequirement

        public void addRequirement​(Requirement requirement)
        Adds a Requirement.
        Parameters:
        requirement - the requirement to add
      • isActive

        public boolean isActive()
        Returns true if the property is active.
        Returns:
        true if the property is active
      • getRequirements

        public Collection<Requirement> getRequirements()
        Returns the requirements.
        Returns:
        the requirements
      • setValue

        public void setValue​(String value)
                      throws InvocationTargetException
        Sets the value of the property. The property has first to be converted to a the corresponding type.
        Parameters:
        value - the value to set
        Throws:
        InvocationTargetException - thrown if the value cannot be assigned
      • isNumber

        public boolean isNumber()
        Returns true if the property represents a number.
        Returns:
        true if the property represents a number
      • getAnnotations

        public Collection<Annotation> getAnnotations()
        Returns the annotations of this property.
        Returns:
        the annotations
      • getAnnotation

        public <A extends Annotation> A getAnnotation​(Class<? extends A> clazz)
        Returns the annotation of the specified class or null if not existent.
        Type Parameters:
        A - the annotation type
        Parameters:
        clazz - the specific annotation class
        Returns:
        the annotation