Extension SDK

oracle.ide.util
Class EmptyWhenTrueMarker

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byoracle.ide.util.EmptyWhenTrueMarker
All Implemented Interfaces:
java.io.Serializable

public final class EmptyWhenTrueMarker
extends java.lang.RuntimeException

The EmptyWhenTrueMarker is a special kind of runtime exception that can be declared in the throws clause of a getter method to indicate to the IDE's marshalling code that the property represented by the getter is a boolean and should not be persisted as an empty element if TRUE, and not persisted at all if FALSE.

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 a transient property is readily apparent, especially once the purpose EmptyWhenTrueMarker is understood.

See Also:
Serialized Form

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
 


Extension SDK

 

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