Source Code Cross Referenced for AnnotationMemberTypes.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » controls » api » bean » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.controls.api.bean 
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:         * $Header:$
018:         */
019:        package org.apache.beehive.controls.api.bean;
020:
021:        import java.lang.annotation.ElementType;
022:        import java.lang.annotation.Retention;
023:        import java.lang.annotation.RetentionPolicy;
024:        import java.lang.annotation.Target;
025:
026:        /**
027:         * <p>AnnotationMemberTypes defines a set of annotations meant to used on
028:         * annotation members to specify additional syntatic and semantic behaviour
029:         * or constraints.</p>
030:         *
031:         * <p>J2SE 5 annotation members provide a very weak level of syntactic and
032:         * semantic enforcement.  Annotation members may only be a certain type
033:         * (mostly primitives, arrays, plus java.lang.String and a few other classes);
034:         * it is often useful to be more specific than those types permit.</p>
035:         *
036:         * <p>Consider the following example:</p>
037:         * 
038:         * <pre>
039:         * public &#064;interface LastChanged
040:         * {
041:         *     &#064;AnnotationMemberTypes.Date()
042:         *     public String date();
043:         * }
044:         * </pre>
045:         *
046:         * <p>The use of <code>&#064;AnnotationMemberTypes.Date</code> means that the
047:         * value of the <code>date</code> string must be a date in some standard
048:         * form.</p>
049:         *
050:         * <p>AnnotationMemberTypes defines a set of annotations and their semantics,
051:         * but actual enforcement of those semantics is implementation dependent.
052:         * An <code>apt</code>-based reference implementation is provided by
053:         * {@link org.apache.beehive.controls.runtime.bean.AnnotationConstraintValidator}.</p>
054:         *
055:         * @see org.apache.beehive.controls.runtime.bean.AnnotationConstraintValidator
056:         */
057:        public interface AnnotationMemberTypes {
058:            public final static String OPTIONAL_STRING = "";
059:            public final static double OPTIONAL_DOUBLE = Double.MIN_VALUE;
060:            public final static float OPTIONAL_FLOAT = Float.MIN_VALUE;
061:            public final static int OPTIONAL_INT = Integer.MIN_VALUE;
062:            public final static long OPTIONAL_LONG = Long.MIN_VALUE;
063:            public final static short OPTIONAL_SHORT = Short.MIN_VALUE;
064:            public final static char OPTIONAL_CHAR = Character.MIN_VALUE;
065:            public final static byte OPTIONAL_BYTE = Byte.MIN_VALUE;
066:            public final static int UNLIMITED_PLACES = -1;
067:
068:            /**
069:             * Marks a member as optional.  Member must have
070:             * a default value.
071:             */
072:            @Target({ElementType.METHOD})
073:            @Retention(RetentionPolicy.RUNTIME)
074:            public @interface Optional {
075:            }
076:
077:            /**
078:             * Member must be a String value.
079:             */
080:            @Target({ElementType.METHOD})
081:            @Retention(RetentionPolicy.RUNTIME)
082:            public @interface Text {
083:                boolean isLong() default false;
084:
085:                int maxLength() default Integer.MAX_VALUE;
086:            }
087:
088:            /**
089:             * Member is a Decimal Value.
090:             * Can be applied to a member that returns float, double or String.
091:             */
092:            @Target({ElementType.METHOD})
093:            @Retention(RetentionPolicy.RUNTIME)
094:            public @interface Decimal {
095:                int places() default UNLIMITED_PLACES;
096:
097:                double minValue() default Double.MIN_VALUE;
098:
099:                double maxValue() default Double.MAX_VALUE;
100:            }
101:
102:            /**
103:             * Member is an Integer value.
104:             * Can be applied to a member that returns String or int.
105:             */
106:            @Target({ElementType.METHOD})
107:            @Retention(RetentionPolicy.RUNTIME)
108:            public @interface Int {
109:                int minValue() default Integer.MIN_VALUE;
110:
111:                int maxValue() default Integer.MAX_VALUE;
112:            }
113:
114:            /**
115:             * Member is a Date in the format specified (default is YYYY/MM/DD)
116:             * Only valid on a member that returns String
117:             * @see java.text.SimpleDateFormat when selecting another date format.
118:             * Note: JSR175 does not allow java.util.Date as
119:             * a member type.
120:             */
121:            @Target({ElementType.METHOD})
122:            @Retention(RetentionPolicy.RUNTIME)
123:            public @interface Date {
124:                String format() default "yyyy/MM/dd";
125:
126:                String minValue() default "";
127:
128:                String maxValue() default "";
129:            }
130:
131:            /**
132:             * Member is a URI
133:             * Only valid on a member that returns String
134:             */
135:            @Target({ElementType.METHOD})
136:            @Retention(RetentionPolicy.RUNTIME)
137:            public @interface URI {
138:            }
139:
140:            /**
141:             * Member is a URN
142:             * Only valid on a member that returns String
143:             */
144:            @Target({ElementType.METHOD})
145:            @Retention(RetentionPolicy.RUNTIME)
146:            public @interface URN {
147:            }
148:
149:            /**
150:             * Member is a URL
151:             * Only valid on a member that returns String
152:             */
153:            @Target({ElementType.METHOD})
154:            @Retention(RetentionPolicy.RUNTIME)
155:            public @interface URL {
156:            }
157:
158:            /**
159:             * Member is a QName
160:             * Only valid on a member that returns String
161:             */
162:            @Target({ElementType.METHOD})
163:            @Retention(RetentionPolicy.RUNTIME)
164:            public @interface QName {
165:            }
166:
167:            /**
168:             * Member contains well formed XML
169:             * Only valid on a member that returns String
170:             */
171:            @Target({ElementType.METHOD})
172:            @Retention(RetentionPolicy.RUNTIME)
173:            public @interface XML {
174:            }
175:
176:            /**
177:             * Member is a File Path
178:             * Compiler MUST validate that value points
179:             * to a <code>readable</code> file.
180:             * Only valid on a member that returns String.
181:             */
182:            @Target({ElementType.METHOD})
183:            @Retention(RetentionPolicy.RUNTIME)
184:            public @interface FilePath {
185:            }
186:
187:            /**
188:             * Member is a JNDI name.
189:             */
190:            @Target({ElementType.METHOD})
191:            @Retention(RetentionPolicy.RUNTIME)
192:            public @interface JndiName {
193:                /**
194:                 * Defines the type of JNDI resource reference by a member.
195:                 */
196:                public enum ResourceType {
197:                    DATASOURCE, EJB, JMS_TOPIC, JMS_QUEUE, OTHER
198:                }
199:
200:                ResourceType resourceType();
201:            }
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.