Source Code Cross Referenced for VMGenericsAndAnnotations.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » vm » 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.vm 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:        package org.apache.harmony.vm;
018:
019:        import java.lang.annotation.Annotation;
020:
021:        /**
022:         * Provides the methods to get signatures used to encode Java programming 
023:         * language type information such as generic type and method declarations and 
024:         * parameterized types.
025:         * <p>
026:         * Provides also the methods to get annotations and their elements values.
027:         * <p>
028:         * This class must be implemented according to the common policy for porting
029:         * interfaces - see the porting interface overview for more detailes.
030:         * 
031:         * @author Serguei S. Zapreyev, Alexey V. Varlamov
032:         * @version $Revision$
033:         * 
034:         * @api2vm
035:         */
036:        public final class VMGenericsAndAnnotations {
037:
038:            /**
039:             * This class is not supposed to be instantiated.
040:             */
041:            private VMGenericsAndAnnotations() {
042:            }
043:
044:            /**
045:             * This method returns the String representation of a Signature 
046:             * attribute corresponding to {@link Method}, {@link Constructor} 
047:             * or {@link Field} object declaration.
048:             * <p>
049:             * @param id an identifier of a reflection member.
050:             * @return the String representation of a Signature attribute or null 
051:             * if a caller's declaration does not use any generics.
052:             *
053:             * @api2vm
054:             */
055:            public static native String getSignature(long id);
056:
057:            /**
058:             * This method returns the String representation of a Signature 
059:             * attribute corresponding to {@link Class} object declaration.
060:             * <p>
061:             * @param cls a class to be reflected.
062:             * @return the String representation of a Signature attribute or null 
063:             * if a caller's declaration does not use any generics.
064:             *
065:             * @api2vm
066:             */
067:            public static native String getSignature(Class cls);
068:
069:            /**
070:             * This method satisfies the requirements of the specification for the
071:             * {@link Field#getDeclaredAnnotations() Field.getDeclaredAnnotations()}, 
072:             * {@link Method#getDeclaredAnnotations() Method.getDeclaredAnnotations()},
073:             * {@link Constructor#getDeclaredAnnotations()
074:             * Constructor.getDeclaredAnnotations()} methods.
075:             * <p>
076:             * @param id an identifier of the caller (Field, or Method,
077:             * or Constructor type).
078:             * @return all annotations directly present on this element or zero-sized 
079:             * array if there are no annotations.
080:             * @throws TypeNotPresentException if enum-valued or nested annotation member 
081:             * (of an annotation) refers to a class that is not accessible.
082:             * @throws AnnotationFormatError if reading an annotation from a class file    
083:             * determines that the annotation is malformed.
084:             * @api2vm
085:             */
086:            public static native Annotation[] getDeclaredAnnotations(long id);
087:
088:            /**
089:             * This method satisfies the requirements of the specification for the
090:             * {@link Class#getDeclaredAnnotations() Class.getDeclaredAnnotations()}. 
091:             * <p>
092:             * @param clss annotated element of the Class type
093:             * @return all annotations directly present on this element or zero-sized 
094:             * array if there are no annotations.
095:             * @throws TypeNotPresentException if enum-valued or nested annotation member 
096:             * (of an annotation) refers to a class that is not accessible.
097:             * @throws AnnotationFormatError if reading an annotation from a class file    
098:             * determines that the annotation is malformed.
099:             * @api2vm
100:             */
101:            public static native Annotation[] getDeclaredAnnotations(Class clss);
102:
103:            /**
104:             * This method satisfies the requirements of the specification for the
105:             * {@link Method#getParameterAnnotations() Method.getParameterAnnotations()}
106:             * and {@link Constructor#getParameterAnnotations() 
107:             * Constructor.getParameterAnnotations()} methods.
108:             * <p>
109:             * @param id an identifier of the caller (annotated element of the Method 
110:             * or Constructor type) class.
111:             * @return an array of arrays that represent the annotations on the formal
112:             * parameters, in declaration order, of the method represented by 
113:             * this Method object. Returns an array of length zero if the underlying method has 
114:             * no parameters. If the method has a parameter or more, a nested array of length
115:             * zero is returned for each parameter with no annotations.
116:             * @throws TypeNotPresentException if Class-valued member (of an annotation)
117:             * referring to a class that is not accessible in this VM.
118:             * @api2vm
119:             */
120:            public static native Annotation[][] getParameterAnnotations(long id);
121:
122:            /**
123:             * This method satisfies the requirements of the specification for the
124:             * {@link Method#getDefaultValue() Method.getDefaultValue()} method. 
125:             * But it takes one additional id parameter.
126:             * <p>
127:             * @param id an identifier of the caller (annotated element of the Method 
128:             * type) class.
129:             * @return the default value for the annotation member represented by this
130:             * Method instance or null.
131:             * @throws TypeNotPresentException if the annotation is of type Class and
132:             * no definition can be found for the default class value
133:             *
134:             * @api2vm
135:             */
136:            public static native Object getDefaultValue(long id);
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.