IT. Expert System.

Android Reference

AnnotationMember


org.apache.harmony.lang.annotation

Class AnnotationMember

  • All Implemented Interfaces:
    Serializable


    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.
        Parameters:
        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:
        setDefinition(AnnotationMember)
      • AnnotationMember

        public AnnotationMember(String name,
                        Object val,
                        Class type,
                        Method m)
        Creates the completely defined element.
        Parameters:
        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.
        Overrides:
        toString in class Object
        Returns:
        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.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare this instance with.
        Returns:
        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.
        Returns:
        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.
        Throws:
        Throwable
      • 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.
        Returns:
        actual valid value or null if no value
        Throws:
        Throwable
        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.
        Returns:
        cloned value if it is mutable or the original immutable value
        Throws:
        Throwable


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

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

License.
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 с