Top Description Fields Constructors Methods
com.sun.beans.decoder

pack-priv final Class MethodElementHandler

extends NewElementHandler
Class Inheritance
Imports
com.sun.beans.finder.MethodFinder, java.lang.reflect.Method, sun.reflect.misc.MethodUtil

This class is intended to handle <method> element. It describes invocation of the method. The name attribute denotes the name of the method to invoke. If the class attribute is specified this element invokes static method of specified class. The inner elements specifies the arguments of the method. For example:
<method name="valueOf" class="java.lang.Long">
    <string>10</string>
</method>
is equivalent to Long.valueOf("10") in Java code.

The following attributes are supported:

name
the method name
class
the type of object for instantiation
id
the identifier of the variable that is intended to store the result
Author
Sergey A. Malenkov
Since
1.7

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(String
the attribute name
name
,
String
the attribute value
value
)

Overrides com.sun.beans.decoder.NewElementHandler.addAttribute.

Parses attributes of the element.
protected ValueObject

Returns:

the value of this element
getValueObject
(Class<?>
the base class
type
,
Object[]
the array of arguments
args
)

Overrides com.sun.beans.decoder.NewElementHandler.getValueObject.

Returns the result of method execution.
Inherited from com.sun.beans.decoder.NewElementHandler:
addArgumentgetArgumentsgetArgumentTypesgetContextBeangetValueObject

Field Detail

nameback to summary
private String name

Constructor Detail

MethodElementHandlerback to summary
pack-priv MethodElementHandler()

Method Detail

addAttributeback to summary
public void addAttribute(String name, String value)

Overrides com.sun.beans.decoder.NewElementHandler.addAttribute.

Parses attributes of the element. The following attributes are supported:

name
the method name
class
the type of object for instantiation
id
the identifier of the variable that is intended to store the result
Parameters
name:String

the attribute name

value:String

the attribute value

Annotations
@Override
getValueObjectback to summary
protected ValueObject getValueObject(Class<?> type, Object[] args) throws Exception

Overrides com.sun.beans.decoder.NewElementHandler.getValueObject.

Returns the result of method execution.

Parameters
type:Class<?>

the base class

args:Object[]

the array of arguments

Returns:ValueObject

the value of this element

Annotations
@Override
Exceptions
Exception:
if calculation is failed