org.quattor.pan.dml.data
Class Undef

java.lang.Object
  extended by org.quattor.pan.dml.data.Element
      extended by org.quattor.pan.dml.data.TransientElement
          extended by org.quattor.pan.dml.data.Undef
All Implemented Interfaces:
Operation

@Immutable
public class Undef
extends TransientElement

Represents the undef value in the pan language.

Author:
loomis

Field Summary
static Undef VALUE
           
 
Method Summary
 void checkValidReplacement(Element newValue)
          Check that the newValue is a valid replacement for the this value.
 boolean equals(java.lang.Object o)
          Require that all Elements implement an equals method.
static Undef getInstance()
           
 java.lang.String getTypeAsString()
          All Elements must return a string describing its type.
 int hashCode()
          Require that all Elements implement the hashCode method.
 java.lang.String locateUndefinedElement()
          Determine if the element contains any undefined (transient) elements.
 java.lang.Object readResolve()
           
 java.lang.String toString()
          Require that all Elements implement a reasonable toString method.
 
Methods inherited from class org.quattor.pan.dml.data.Element
checkInvalidSelfContext, checkRange, checkRestrictedContext, defined, duplicate, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isProtected, isResource, isString, isTransient, protect, rget, rgetList, rput, writableCopy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE

public static final Undef VALUE
Method Detail

readResolve

public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

getInstance

public static Undef getInstance()

locateUndefinedElement

public java.lang.String locateUndefinedElement()
Description copied from class: Element
Determine if the element contains any undefined (transient) elements. The call will return null if no undefined elements are found; it will return a string indicating the relative path if an undefined element is found. Subclasses MUST override this method appropriately. This default method will work only for elements which are not containers and not a transient element.

Overrides:
locateUndefinedElement in class Element
Returns:
String representation of the path of the undefined element, null otherwise

checkValidReplacement

public void checkValidReplacement(Element newValue)
                           throws EvaluationException
Description copied from class: Element
Check that the newValue is a valid replacement for the this value. This implementation will check if the newValue is assignable from the current value or that the newValue is either undef or null. If not, an evaluation exception will be thrown. This implementation should be overridden if more liberal replacements are allowed.

Overrides:
checkValidReplacement in class Element
Parameters:
newValue - the new value for the replacement
Throws:
EvaluationException - if the new value is not a valid replacement of the existing value

getTypeAsString

public java.lang.String getTypeAsString()
Description copied from class: Element
All Elements must return a string describing its type. This value used in the serialization to machine profiles.

Specified by:
getTypeAsString in class Element
Returns:
String representation of Element's type

hashCode

public int hashCode()
Description copied from class: Element
Require that all Elements implement the hashCode method.

Specified by:
hashCode in class Element

equals

public boolean equals(java.lang.Object o)
Description copied from class: Element
Require that all Elements implement an equals method.

Specified by:
equals in class Element

toString

public java.lang.String toString()
Description copied from class: Element
Require that all Elements implement a reasonable toString method.

Specified by:
toString in class Element


Copyright © 2011 Quattor. All Rights Reserved.