Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.marshal
Class AttributeMarker

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.javatools.marshal.AttributeMarker

All Implemented Interfaces:
java.io.Serializable

public final class AttributeMarker
extends java.lang.RuntimeException

The AttributeMarker class can be declared in the throws clause of a getter method to indicate to the marshalling code that a particular persistent property should be persisted in XML as an attribute instead of an element. In order for this to succeed, the type of the property must be directly convertible to and from a String form.

Java's ability to annotate methods with metadata at compile-time is very limited. BeanInfo classes tend to be cumbersome and the information in the BeanInfo class can often be overlooked since the BeanInfo code is usually in a separate file and sometimes even in a separate package. By using a "marker exception" in the throws clause of the getter, the fact that the getter represents an XML attribute is readily apparent, especially once the purpose of AttributeMarker is understood.

See Also:
Serialized Form

Method Summary

 

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 


Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.