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

pack-priv final Class JavaElementHandler

extends ElementHandler
Class Inheritance
Imports
java.beans.XMLDecoder

This class is intended to handle <java> element. Each element that appears in the body of this element is evaluated in the context of the decoder itself. Typically this outer context is used to retrieve the owner of the decoder, which can be set before reading the archive.

The following attributes are supported:

version
the Java version (not supported)
class
the type of preferable parser (not supported)
id
the identifier of the variable that is intended to store the result
Author
Sergey A. Malenkov
Since
1.7
See Also
DocumentHandler#getOwner, DocumentHandler#setOwner

Field Summary

Modifier and TypeField and Description
private Class<?>
private ValueObject

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
addArgument(Object
the value of the element that contained in this one
argument
)

Overrides com.sun.beans.decoder.ElementHandler.addArgument.

Adds the argument to the list of read objects.
public void
addAttribute(String
the attribute name
name
,
String
the attribute value
value
)

Overrides com.sun.beans.decoder.ElementHandler.addAttribute.

Parses attributes of the element.
private Object

Returns:

the owner of the owner document handler
getValue
()

Returns the owner of the owner document handler as a value of <java> element.

protected ValueObject

Returns:

the value of this element
getValueObject
()

Implements abstract com.sun.beans.decoder.ElementHandler.getValueObject.

Returns the value of this element.
protected boolean

Returns:

true if the value of this element should be used as an argument of the element that contained in this one, false otherwise
isArgument
()

Overrides com.sun.beans.decoder.ElementHandler.isArgument.

Tests whether the value of this element can be used as an argument of the element that contained in this one.
private boolean

Returns:

true if the owner is valid; false otherwise
isValid
(Object
the owner of the <java> element
owner
)

Validates the owner of the <java> element.

Inherited from com.sun.beans.decoder.ElementHandler:
addCharacterendElementgetContextBeangetOwnergetParentgetVariablesetOwnersetParentstartElement

Field Detail

typeback to summary
private Class<?> type
valueback to summary
private ValueObject value

Constructor Detail

JavaElementHandlerback to summary
pack-priv JavaElementHandler()

Method Detail

addArgumentback to summary
protected void addArgument(Object argument)

Overrides com.sun.beans.decoder.ElementHandler.addArgument.

Adds the argument to the list of read objects.

Parameters
argument:Object

the value of the element that contained in this one

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

Overrides com.sun.beans.decoder.ElementHandler.addAttribute.

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

version
the Java version (not supported)
class
the type of preferable parser (not supported)
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
getValueback to summary
private Object getValue()

Returns the owner of the owner document handler as a value of <java> element.

Returns:Object

the owner of the owner document handler

getValueObjectback to summary
protected ValueObject getValueObject()

Implements abstract com.sun.beans.decoder.ElementHandler.getValueObject.

Returns the value of this element.

Returns:ValueObject

the value of this element

Annotations
@Override
isArgumentback to summary
protected boolean isArgument()

Overrides com.sun.beans.decoder.ElementHandler.isArgument.

Tests whether the value of this element can be used as an argument of the element that contained in this one.

Returns:boolean

true if the value of this element should be used as an argument of the element that contained in this one, false otherwise

Annotations
@Override
isValidback to summary
private boolean isValid(Object owner)

Validates the owner of the <java> element. The owner is valid if it is null or an instance of the class specified by the class attribute.

Parameters
owner:Object

the owner of the <java> element

Returns:boolean

true if the owner is valid; false otherwise