IT. Expert System.

Android Reference



Class AnnotationMember

  • All Implemented Interfaces:

    public class AnnotationMember
    extends Object
    implements Serializable
    This class represents member element of an annotation. It consists of name and value, supplemented with element definition information (such as declared type of element).
    The value may be one of the following types:
    • boxed primitive
    • Class
    • enum constant
    • annotation (nested)
    • one-dimensional array of the above
    • Throwable
    The last type is specific for this implementation; a Throwable value means that the error occured during parsing or resolution of corresponding class-data structures and throwing is delayed until the element is requested for value.
    See Also:
    android.lang.annotation.AnnotationFactory, Serialized Form
    • Field Detail

      • ERROR

        protected static final char ERROR
        Tag description of a Throwable value type.
        See Also:
        Constant Field Values
      • ARRAY

        protected static final char ARRAY
        Tag description of an array value type.
        See Also:
        Constant Field Values
      • OTHER

        protected static final char OTHER
        Tag description of all value types except arrays and Throwables.
        See Also:
        Constant Field Values
      • NO_VALUE

        protected static final Object NO_VALUE
        Singleton representing missing element value.
      • name

        protected final String name
      • value

        protected final Object value
      • tag

        protected final char tag
      • elementType

        protected transient Class<?> elementType
      • definingMethod

        protected transient Method definingMethod
    • Constructor Detail

      • AnnotationMember

        public AnnotationMember(String name,
                        Object val)
        Creates a new element with specified name and value. Definition info will be provided later when this element becomes actual annotation member.
        name - element name, must not be null
        val - element value, should be of addmissible type, as specified in the description of this class
        See Also:
      • AnnotationMember

        public AnnotationMember(String name,
                        Object val,
                        Class type,
                        Method m)
        Creates the completely defined element.
        name - element name, must not be null
        value - element value, should be of addmissible type, as specified in the description of this class
        m - element-defining method, reflected on the annotation type
        type - declared type of this element (return type of the defining method)
    • Method Detail

      • toString

        public String toString()
        Returns readable description of this annotation value.
        toString in class Object
        a printable representation of this object.
      • equals

        public boolean equals(Object obj)
        Returns true if the specified object represents equal element (equivalent name-value pair).
        A special case is the contained Throwable value; it is considered transcendent so no other element would be equal.
        equals in class Object
        obj - the object to compare this instance with.
        true if passed object is equivalent element representation, false otherwise
        See Also:
        equalArrayValue(Object), Annotation.equals(Object)
      • equalArrayValue

        public boolean equalArrayValue(Object otherValue)
        Returns true if the contained value and a passed object are equal arrays, false otherwise. Appropriate overloaded method of Arrays.equals() is used for equality testing.
        true if the value is array and is equal to specified object, false otherwise
        See Also:
        Arrays.equals(java.lang.Object[], java.lang.Object[])
      • rethrowError

        public void rethrowError()
                          throws Throwable
        Throws contained error (if any) with a renewed stack trace.
      • validateValue

        public Object validateValue()
                             throws Throwable
        Validates contained value against its member definition and if ok returns the value. Otherwise, if the value type mismatches definition or the value itself describes an error, throws appropriate exception.
        Note, this method may return null if this element was constructed with such value.
        actual valid value or null if no value
        See Also:
        rethrowError(), copyValue()
      • copyValue

        public Object copyValue()
                         throws Throwable
        Provides mutation-safe access to contained value. That is, caller is free to modify the returned value, it will not affect the contained data value.
        cloned value if it is mutable or the original immutable value


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 146 / 158852148. Delta: 0.00490 с