KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Defines a new asset. The asset will have the same name as the property (and will be accessible
25  * via the "asset:" binding prefix, or using {@link org.apache.tapestry.IComponent#getAsset(String)},
26  * with that name).
27  * <p>
28  * Note: if we ever rename IAsset to Asset, this will cause a naming conflict. Perhaps we should
29  * come up with annotation names that are compatible with a potential rename.
30  *
31  * @author Howard M. Lewis Ship
32  * @since 4.0
33  */

34
35 @Target(
36 { ElementType.METHOD })
37 @Retention JavaDoc(RetentionPolicy.RUNTIME)
38 @Documented JavaDoc
39 public @interface Asset {
40
41     /**
42      * The value is the asset path, which may include a prefix to define the module in which it can
43      * be resolved.
44      */

45
46     String JavaDoc value();
47 }
48
Popular Tags