Class RPClassGenerator.RPClassWrapper

java.lang.Object
games.stendhal.server.core.engine.RPClassGenerator.RPClassWrapper
Enclosing class:
RPClassGenerator

public static class RPClassGenerator.RPClassWrapper extends Object
Wrapper to protect against overwriting reserved RPClass attributes. TODO: replace this by adding attribute checking to RPClass and internal add method to be called by constructor that bypasses check
  • Constructor Details

    • RPClassWrapper

      public RPClassWrapper(String name)
      Hidden constructor as this class should not be instantiated on its own, rather it should be cast to from an RPClass instance.
      Parameters:
      name - The class name.
  • Method Details

    • getRPClass

      public RPClass getRPClass()
      Retrieves RP class.
      Returns:
      RP class instance.
    • addAttribute

      public void addAttribute(String name, Definition.Type type, byte flags)
      Add an attribute to class.
      Parameters:
      name - Attribute name.
      type - Attribute data type.
      flags - Attribute flags such as visibility, storability, etc.
    • addAttribute

      public void addAttribute(String name, Definition.Type type)
      Add an attribute to class.
      Parameters:
      name - Attribute name.
      type - Attribute data type.