Java Doc for AnnotationMember.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » lang » annotation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » org package » org.apache.harmony.lang.annotation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.lang.annotation.AnnotationMember

AnnotationMember
public class AnnotationMember implements Serializable(Code)
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:   org.apache.harmony.lang.annotation.AnnotationFactory
author:
   Alexey V. Varlamov, Serguei S. Zapreyev
version:
   $Revision$


Field Summary
final protected static  charARRAY
     Tag description of an array value type.
final protected static  charERROR
     Tag description of a Throwable value type.
final protected static  ObjectNO_VALUE
     Singleton representing missing element value.
final protected static  charOTHER
     Tag description of all value types except arrays and Throwables.
protected transient  MethoddefiningMethod
    
protected transient  ClasselementType
    
final protected  Stringname
    
final protected  chartag
    
final protected  Objectvalue
    

Constructor Summary
public  AnnotationMember(String name, Object val)
     Creates a new element with specified name and value.
public  AnnotationMember(String name, Object val, Class type, Method m)
     Creates the completely defined element.

Method Summary
public  ObjectcopyValue()
     Provides mutation-safe access to contained value.
public  booleanequalArrayValue(Object otherValue)
     Returns true if the contained value and a passed object are equal arrays, false otherwise.
public  booleanequals(Object obj)
     Returns true if the specified object represents equal element (equivalent name-value pair).
public  inthashCode()
     Computes hash code of this element.
public  voidrethrowError()
     Throws contained error (if any) with a renewed stack trace.
protected  AnnotationMembersetDefinition(AnnotationMember copy)
     Fills in element's definition info and returns this.
public  StringtoString()
     Returns readable description of this annotation value.
public  ObjectvalidateValue()
     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.

Field Detail
ARRAY
final protected static char ARRAY(Code)
Tag description of an array value type.



ERROR
final protected static char ERROR(Code)
Tag description of a Throwable value type.



NO_VALUE
final protected static Object NO_VALUE(Code)
Singleton representing missing element value.



OTHER
final protected static char OTHER(Code)
Tag description of all value types except arrays and Throwables.



definingMethod
protected transient Method definingMethod(Code)



elementType
protected transient Class elementType(Code)



name
final protected String name(Code)



tag
final protected char tag(Code)



value
final protected Object value(Code)




Constructor Detail
AnnotationMember
public AnnotationMember(String name, Object val)(Code)
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
Parameters:
  val - element value, should be of addmissible type, as specified in the description of this class
See Also:   AnnotationMember.setDefinition(AnnotationMember)



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




Method Detail
copyValue
public Object copyValue() throws Throwable(Code)
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



equalArrayValue
public boolean equalArrayValue(Object otherValue)(Code)
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.
See Also:   java.util.Arrays.equals(java.lang.Object[]java.lang.Object[]) true if the value is array and is equal to specified object,false otherwise



equals
public boolean equals(Object obj)(Code)
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. true if passed object is equivalent element representation,false otherwise
See Also:   AnnotationMember.equalArrayValue(Object)
See Also:   java.lang.annotation.Annotation.equals(Object)



hashCode
public int hashCode()(Code)
Computes hash code of this element. The formula is as follows: (name.hashCode() * 127) ^ value.hashCode()
If value is an array, one of overloaded Arrays.hashCode() methods is used. the hash code
See Also:   java.util.Arrays.hashCode(java.lang.Object[])
See Also:   java.lang.annotation.Annotation.hashCode



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



setDefinition
protected AnnotationMember setDefinition(AnnotationMember copy)(Code)
Fills in element's definition info and returns this.



toString
public String toString()(Code)
Returns readable description of this annotation value.



validateValue
public Object validateValue() throws Throwable(Code)
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.
See Also:   AnnotationMember.rethrowError()
See Also:   AnnotationMember.copyValue() actual valid value or null if no value



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.