Package snap.props

Class Prop

java.lang.Object
snap.props.Prop

public class Prop extends Object
This class represents a property.
  • Constructor Details

    • Prop

      public Prop(String aName)
      Constructor.
    • Prop

      public Prop(String aName, Class<?> aClass, Object aDefault)
      Constructor.
  • Method Details

    • getName

      public String getName()
      Returns the name.
    • getPropClass

      public Class<?> getPropClass()
      Returns the return class.
    • setPropClass

      protected void setPropClass(Class<?> aClass)
      Sets the return class.
    • getDefaultPropClass

      public Class<?> getDefaultPropClass()
      Returns the default property class (if different from prop class).
    • setDefaultPropClass

      public void setDefaultPropClass(Class<?> aClass)
      Sets the default property class (if different from prop class).
    • isPropClassConstant

      public boolean isPropClassConstant()
      Returns whether prop is always instance of PropClass (subclasses not allowed). This undoubtedly needs to be a real property one day (PropClassVaries?).
    • isArray

      public boolean isArray()
      Returns whether prop is array.
    • isRelation

      public boolean isRelation()
      Returns whether prop is relation (not primitive).
    • getDefaultValue

      public Object getDefaultValue()
      Returns the default value.
    • setDefaultValue

      public void setDefaultValue(Object aValue)
      Sets the default value.
    • isSkipArchival

      public boolean isSkipArchival()
      Returns whether this prop is skipped for archival.
    • setSkipArchival

      public void setSkipArchival(boolean aValue)
      Sets whether this prop is skipped for archival.
    • isPreexisting

      public boolean isPreexisting()
      Returns whether prop value already exists in parent (should be used in place during unarchival).
    • setPreexisting

      public void setPreexisting(boolean aValue)
      Sets whether prop value already exists in parent (should be used in place during unarchival).
    • isPropChanger

      public boolean isPropChanger()
      Returns whether this prop can change an object's props (ArchivalPropsExtra).
    • setPropChanger

      public void setPropChanger(boolean aValue)
      Sets whether this prop can change an object's props (ArchivalPropsExtra).
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object
    • toStringProps

      public String toStringProps()
      Standard toStringProps implementation.