Class GeneratedClass

java.lang.Object
edu.nps.moves.dis7.source.generator.pdus.GeneratedClass

public class GeneratedClass extends Object
Represents one generated class. A generated class has a series of attributes, the order of which is significant. These attributes are used to create instance variables, getters and setters, and serialization code.
Author:
DMcG
  • Field Details

    • classAttributes

      protected List<ClassAttribute> classAttributes
      A list of all the attributes (ivars) of one class
    • initialValues

      protected List<InitialValue> initialValues
      A list of attribute names and initial values for those attributes.
    • name

      protected String name
      Name of generated class
    • parentClass

      protected String parentClass
      parent class
    • aliasFor

      protected String aliasFor
      alias for class
    • interfaces

      protected String interfaces
      interfaces
    • xmlRootElement

      protected boolean xmlRootElement
      Whether this is an XmlRootElement; used only with XML marshalling
    • specialCase

      protected String specialCase
      Special case for, e.g., enum collection/subclass
    • abstractClass

      protected boolean abstractClass
      whether this class should be abstract
  • Constructor Details

    • GeneratedClass

      public GeneratedClass()
      Constructor creates and configures a new instance object
  • Method Details

    • setParentClass

      public void setParentClass(String pParentClass)
      setter for parent class
      Parameters:
      pParentClass - parent class
    • getParentClass

      public String getParentClass()
      get parent class
      Returns:
      parent class
    • getInterfaces

      public String getInterfaces()
      get interfaces
      Returns:
      interfaces
    • setInterfaces

      public void setInterfaces(String pInterfaces)
      set interfaces
      Parameters:
      pInterfaces - interfaces
    • getName

      public String getName()
      get name
      Returns:
      name
    • setName

      public void setName(String pName)
      set name
      Parameters:
      pName - new name
    • addClassAttribute

      public void addClassAttribute(ClassAttribute anAttribute)
      Add one ivar/attribute to the class
      Parameters:
      anAttribute - of interest
    • getClassAttributes

      public List<ClassAttribute> getClassAttributes()
      Return a list of all the attributes of the class
      Returns:
      list of ClassAttribute values
    • addInitialValue

      public void addInitialValue(InitialValue anInitialValue)
      Add one initial value to the class
      Parameters:
      anInitialValue - of interest
    • getInitialValues

      public List<InitialValue> getInitialValues()
      Return a list of all the initial values of the class
      Returns:
      list of InitialValue settings
    • setComment

      public void setComment(String comments)
      Set the comments associated with this class
      Parameters:
      comments - of interest
    • getClassComments

      public String getClassComments()
      get the comments associated with this class
      Returns:
      comments associated with this class
    • toString

      public String toString()
      String representation for this object
      Overrides:
      toString in class Object
      Returns:
      representation for this object
    • isXmlRootElement

      public boolean isXmlRootElement()
      whether class is XML root element
      Returns:
      whether class is XML root element
    • setXmlRootElement

      public void setXmlRootElement(boolean isXmlRootElement)
      set whether class is XML root element
      Parameters:
      isXmlRootElement - whether class is XML root element
    • setSpecialCase

      public void setSpecialCase(String flag)
      whether object is special case
      Parameters:
      flag - whether object is special case
    • getSpecialCase

      public String getSpecialCase()
      whether object is special case
      Returns:
      whether object is special case
    • setAbstract

      public void setAbstract(String flag)
      set whether object is abstract
      Parameters:
      flag - true or false
    • isAbstract

      public boolean isAbstract()
      whether object is abstract
      Returns:
      whether object is abstract
    • setAliasFor

      public void setAliasFor(String aliasFor)
      set alias name
      Parameters:
      aliasFor - alias name for this class
    • getAliasFor

      public String getAliasFor()
      get alias name
      Returns:
      alias name