1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*******************************************************************************
* Copyright (c) 2001, 2008 Oracle Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Oracle Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsf.common.runtime.internal.model.component;
import org.eclipse.jst.jsf.common.runtime.internal.model.types.ClassTypeInfo;
/**
* Type information about a UIComponent
*
* @author cbateman
*
*/
public class ComponentTypeInfo extends ClassTypeInfo
{
/**
* serializable uid
*/
private static final long serialVersionUID = -311156682935177206L;
/**
* the ComponentType (see JSF spec for definition)
*/
protected final String _componentType; // may be null, since may not be
// known at runtime
/**
* the component family (see JSF spec)
*/
protected final String _componentFamily;
/**
* the render family (see JSF spec)
*/
protected final String _renderFamily;
/**
* @param componentType
* @param componentClass
* @param componentFamily
* @param renderFamily
*/
public ComponentTypeInfo(final String componentType,
final String componentClass, final String componentFamily,
final String renderFamily)
{
super(componentClass, new String[0], new String[0]);
_componentType = componentType;
_componentFamily = componentFamily;
_renderFamily = renderFamily;
}
/**
* @param componentType
* @param superClasses
* @param interfaces
* @param componentClass
* @param componentFamily
* @param renderFamily
*/
public ComponentTypeInfo(final String componentType,
final String componentClass,
final String[] superClasses, final String[] interfaces,
final String componentFamily,
final String renderFamily)
{
super(componentClass, superClasses, interfaces);
_componentType = componentType;
_componentFamily = componentFamily;
_renderFamily = renderFamily;
}
/**
* @return the component type or null if unknown (may not be at runtime)
*/
public final String getComponentType()
{
return _componentType;
}
/**
* @return the component family
*/
public final String getComponentFamily()
{
return _componentFamily;
}
/**
* @return the render family
*/
public final String getRenderFamily()
{
return _renderFamily;
}
public String toString()
{
return "Component Type Info: type = " + _componentType + " family=" + _componentFamily //$NON-NLS-1$ //$NON-NLS-2$
+ " renderer=" + _renderFamily + ", "+super.toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
}
|