Module com.sun.xml.bind
Interface Property<BeanT>
-
- All Superinterfaces:
StructureLoaderBuilder
- All Known Implementing Classes:
AttributeProperty,ValueProperty
public interface Property<BeanT> extends StructureLoaderBuilder
A JAXB property that constitutes a JAXB-bound bean.- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
-
-
Field Summary
-
Fields inherited from interface org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder
CATCH_ALL, TEXT_HANDLER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessorgetElementPropertyAccessor(String nsUri, String localName)If this property is mapped to the specified element, return an accessor to it.StringgetFieldName()StringgetIdValue(BeanT bean)Gets the value of the property.RuntimePropertyInfogetInfo()Provides moreRuntimePropertyInfoinformation on the property.PropertyKindgetKind()Gets the Kind of propertybooleanhasSerializeURIAction()Returns true ifserializeURIs(Object,XMLSerializer)performs some meaningful action.booleanisHiddenByOverride()voidreset(BeanT o)Resets the property value on the given object.voidserializeBody(BeanT beanT, XMLSerializer target, Object outerPeer)voidserializeURIs(BeanT beanT, XMLSerializer target)voidsetHiddenByOverride(boolean hidden)voidwrapUp()Called at the end of theJAXBContextinitialization phase to clean up any unnecessary references.-
Methods inherited from interface org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder
buildChildElementUnmarshallers
-
-
-
-
Method Detail
-
reset
void reset(BeanT o) throws AccessorException
Resets the property value on the given object.... for example by setting 0 or null.
- Throws:
AccessorException
-
serializeBody
void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException
- Parameters:
outerPeer- used when this property is expected to print out an element and that should be associated with this outer peer. normally null. this is only used forJaxBeanInfoforJAXBElements.- Throws:
AccessorException- If thrown, caught by the caller and reported.SAXExceptionIOExceptionXMLStreamException- See Also:
JaxBeanInfo.serializeBody(Object, XMLSerializer)
-
serializeURIs
void serializeURIs(BeanT beanT, XMLSerializer target) throws SAXException, AccessorException
- Throws:
SAXExceptionAccessorException- See Also:
JaxBeanInfo.serializeURIs(Object, XMLSerializer)
-
hasSerializeURIAction
boolean hasSerializeURIAction()
Returns true ifserializeURIs(Object,XMLSerializer)performs some meaningful action.
-
getIdValue
String getIdValue(BeanT bean) throws AccessorException, SAXException
Gets the value of the property. This method is only used when the correspondingPropertyInfo.id()isID.ID, and therefore the return type is fixed toString.- Throws:
AccessorExceptionSAXException
-
getKind
PropertyKind getKind()
Gets the Kind of property- Returns:
- always non-null.
-
getElementPropertyAccessor
Accessor getElementPropertyAccessor(String nsUri, String localName)
If this property is mapped to the specified element, return an accessor to it.- Returns:
- null if the property is not mapped to the specified element.
-
wrapUp
void wrapUp()
Called at the end of theJAXBContextinitialization phase to clean up any unnecessary references.
-
getInfo
RuntimePropertyInfo getInfo()
Provides moreRuntimePropertyInfoinformation on the property.- Returns:
- null if RETAIN_REFERENCE_TO_INFO property is not set on the
JAXBContext
-
isHiddenByOverride
boolean isHiddenByOverride()
-
setHiddenByOverride
void setHiddenByOverride(boolean hidden)
-
getFieldName
String getFieldName()
-
-