|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threerings.antidote.MutabilityHelper
public class MutabilityHelper
A static helper utility for dealing with mutable Ant data.
Constructor Summary | |
---|---|
MutabilityHelper()
|
Method Summary | |
---|---|
static SetStatus |
areMutablesSet(Mutable... mutables)
Return a SetStatus enum describing the "set" state, of the list of
supplied Mutable objects. |
static boolean |
objectIsNotSet(Object object)
Checks to see if the supplied Object is not set, e.g. |
static boolean |
objectIsSet(Object object)
Checks to see if the supplied Object is set, e.g. |
static void |
requiresValidation(Object notNull)
Alerts the developer via an RequiresValidationException that an object was accessed before
validate() or validateField() was called, which is the method where the object is being set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MutabilityHelper()
Method Detail |
---|
public static boolean objectIsSet(Object object)
public static boolean objectIsNotSet(Object object)
public static SetStatus areMutablesSet(Mutable... mutables)
SetStatus
enum describing the "set" state, of the list of
supplied Mutable
objects.
public static void requiresValidation(Object notNull)
RequiresValidationException
that an object was accessed before
validate() or validateField() was called, which is the method where the object is being set.
This is a workaround for Ant's mutable state.
It is expected this method would be used as a static import to increase readability as in:
requiresValidation(object);
RequiresValidationException
- If the supplied object is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |