org.apache.ws.jaxme.xs.parser.impl
public class AttributeSetterImpl extends Object implements AttributeSetter
Default implementation of the AttributeSetter interface.
Method Summary | |
---|---|
protected XSContext | getData() |
protected Object | invokeMethod(Object pBean, Method pMethod, String pName, Object[] pArgs) This method invokes the beans |
void | setAttribute(String pQName, String pNamespaceURI, String pLocalName, String pValue) This method configures the bean
|
protected boolean | setProperty(Object pBean, String pQName, String pName, String pValue) This method is invoked from within AttributeSetterImpl. |
This method invokes the beans pBean
method pMethod
,
setting the attribute pName
to the value pArgs
.
This method configures the bean pBean
as follows:
setAttribute(String, String, String)
, it is invoked
with the following arguments:
This method is invoked from within AttributeSetterImpl.
It configures the bean pBean
as follows;
setProperty(String)
this method is invoked with the attribute value.setProperty(T)
, and
the class T
has either of a method
public static T valueOf(String)
or a constructor
public T(String)
(in that order), then the method
setProperty(T)
is invoked with the value obtained
by an invocation of the method valueOf()
, or
the constructor, respectively. Note, that this applies in
particular to the classes Long, Integer,
Short, Byte, Double, Float,
java.math.BigInteger
, java.math.BigDecimal
,
java.io.File, and java.lang.StringBuffer.setProperty(boolean)
,
the method will be invoked with the value true
(the value specified in the XML file is either of
true
, or 1
, otherwise with the
value false
.setProperty(char)
,
or setProperty(Character)
, the method will be
invoked with the first character of the value specified in
the XML file. If the value contains zero or multiple characters,
an IllegalArgumentException is thrown.setProperty(long)
setProperty(int)
setProperty(short)
setProperty(byte)
setProperty(double)
setProperty(float)
java.lang.Class
, the
XsSAXParser
will interpret the value given in the
XML file as a Java class name and load the named class from its
class loader. If the class cannot be loaded, it will also try
to use the current threads context class loader. An
exception is thrown, if neither of the class loaders can
load the class.Returns: True, if a method for setting the property was found. Otherwise false.