KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > annotations > Component


1 // Copyright 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.annotations;
16
17 import java.lang.annotation.Documented JavaDoc;
18 import java.lang.annotation.ElementType JavaDoc;
19 import java.lang.annotation.Retention JavaDoc;
20 import java.lang.annotation.RetentionPolicy JavaDoc;
21 import java.lang.annotation.Target JavaDoc;
22
23 /**
24  * Annotation used within a page or component class to define a contained component (which will
25  * typically match up against a component reference in the template). This annotation is attached to
26  * an accessor method.
27  *
28  * @author Howard Lewis Ship
29  * @since 4.0
30  */

31 @Target(
32 { ElementType.METHOD })
33 @Retention JavaDoc(RetentionPolicy.RUNTIME)
34 @Documented JavaDoc
35 public @interface Component {
36
37     /**
38      * The component's id. Defaults to the property name if left unspecified.
39      */

40
41     String JavaDoc id() default "";
42
43     /**
44      * The component type.
45      */

46
47     String JavaDoc type();
48
49     /**
50      * If true, then the component inherits informal parameters from its container.
51      */

52
53     boolean inheritInformalParameters() default false;
54
55     /**
56      * Bindings for the component. Each binding string is of the format
57      * <code><em>name</em>=<em>binding refernce</em></code>, where the binding reference is
58      * the same kind of string (possibly with a prefix such as "ognl:" or "message:" as would appear
59      * in a specification.
60      *
61      * @Binding annotations.
62      */

63
64     String JavaDoc[] bindings() default {};
65 }
66
Popular Tags