KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > forms > datatype > typeimpl > BeanType


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

16 package org.apache.cocoon.forms.datatype.typeimpl;
17
18 import org.apache.cocoon.forms.datatype.convertor.Convertor;
19
20
21 /**
22  * The CForm type of a bean
23  *
24  * @author <a HREF="mailto:giacomo@apache.org">Giacomo Pati</a>
25  * @version $Id$
26  */

27 public class BeanType
28     extends AbstractDatatype
29 {
30     //~ Constructors -----------------------------------------------------------
31

32     /**
33      * Creates a new BeanType object.
34      *
35      * @param arrayType whether it's an array or not
36      * @param builder The {@link BeanTypeBuilder}
37      */

38     public BeanType( final boolean arrayType,
39                      final BeanTypeBuilder builder )
40     {
41         super( );
42         setArrayType( arrayType );
43         setBuilder( builder );
44     }
45
46     //~ Methods ----------------------------------------------------------------
47

48     /**
49      * @see org.apache.cocoon.forms.datatype.Datatype#getDescriptiveName()
50      */

51     public String JavaDoc getDescriptiveName( )
52     {
53         final Class JavaDoc c1 = this.getConvertor( ).getTypeClass( );
54
55         return this.getConvertor( ).getTypeClass( ).getName( );
56     }
57
58     /**
59      * We make sure the plain Convertor is the same
60      *
61      * @return The convertor
62      */

63     public Convertor getPlainConvertor( )
64     {
65         return getConvertor( );
66     }
67
68     /**
69      * @see org.apache.cocoon.forms.datatype.Datatype#getTypeClass()
70      */

71     public Class JavaDoc getTypeClass( )
72     {
73         return this.getConvertor( ).getTypeClass( );
74     }
75 }
76
Popular Tags