SWIXML 1.5 (#144) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface Factory
Field Summary | |
static String | |
static String |
|
Method Summary | |
Method |
|
Method |
|
Collection | |
Class | |
Method |
|
Object |
|
Object |
|
Object |
|
public static final String ADDER_ID
public static final String SETTER_ID
Specifies the prefix string for all setter methods
public Method getSetter(Class template)
Returns a setter method, which accepts a parameter of the given type
- Parameters:
template
-Class
type of the setter method's parameter
- Returns:
Method
setter method which maybe invoked on an object of the template class
public Method getSetter(String name)
Returns a setter method by name
- Parameters:
name
-String
name of the setter method
- Returns:
Method
- setter method which can be invoked on an object of the template class
- See Also:
guessSetter
Typical Use:Method method = factory.getSetter("set" + Parser.capitalize(attr.getName()));
public Collection getSetters()
- Returns:
Collection
- containing all available setter methods
public Class getTemplate()
- Returns:
- class -
Class
the backing class template
public Method guessSetter(String name)
Returns a setter method by a Attribute name. Differently to thegetSetter
method, here the attibute name can be used directly and case doesn't matter.
- Parameters:
name
-String
name of the setter method
- Returns:
Method
- setter method which can invoked on an object of the template class
- See Also:
getSetter
Typical Use:Method method = factory.getSetter( attr.getName() );
public Object newInstance() throws Exception
Create a new component instance
- Returns:
- instance
Object
a new instance of a template class
public Object newInstance(Object parameter) throws Exception
Creates a new Object which class isgetTemplate()
- Parameters:
parameter
-Object
, parameter used during construction or initialization.
- Returns:
- instance
Object
a new instance of a template class
public Object newInstance(Object[] parameter) throws InstantiationException, IllegalAccessException, InvocationTargetException
Creates a new Object which class isgetTemplate()
and the constructor parameter areparameter
.
- Parameters:
parameter
-Object[]
the parameter array to be passed into the constructor
- Returns:
Object - the created object, an instance of the template class