KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > spec > BindingType


1 // Copyright 2004, 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.spec;
16
17 /**
18  * Defines the different types of bindings possible for a component. These are used in the
19  * {@link IBindingSpecification} and ultimately used to create an instance of
20  * {@link org.apache.tapestry.IBinding}.
21  *
22  * @author Howard Lewis Ship
23  */

24
25 public final class BindingType
26 {
27     /**
28      * Indicates that the binding value is a prefixed locator, ready for use with
29      * {@link org.apache.tapestry.binding.BindingSource}.
30      */

31
32     public static final BindingType PREFIXED = new BindingType("PREFIXED");
33
34     public static final BindingType INHERITED = new BindingType("INHERITED");
35
36     /**
37      * Indicates a {@link org.apache.tapestry.binding.ListenerBinding}, a specialized kind of
38      * binding that encapsulates a component listener as a script. Uses a subclass of
39      * {@link BindingSpecification},{@link ListenerBindingSpecification}.
40      * {@link IListenerBindingSpecification}.
41      *
42      * @since 3.0
43      */

44
45     public static final BindingType LISTENER = new BindingType("LISTENER");
46
47     private final String JavaDoc _name;
48
49     private BindingType(String JavaDoc name)
50     {
51         _name = name;
52     }
53
54     public String JavaDoc toString()
55     {
56         return "BindingType[" + _name + "]";
57     }
58 }
Popular Tags