Class RPClassGenerator.RPClassWrapper
java.lang.Object
games.stendhal.server.core.engine.RPClassGenerator.RPClassWrapper
- Enclosing class:
- RPClassGenerator
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 Summary
ConstructorsConstructorDescriptionRPClassWrapper(String name) Hidden constructor as this class should not be instantiated on its own, rather it should be cast to from an RPClass instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Definition.Type type) Add an attribute to class.voidaddAttribute(String name, Definition.Type type, byte flags) Add an attribute to class.Retrieves RP class.
-
Constructor Details
-
RPClassWrapper
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
Retrieves RP class.- Returns:
- RP class instance.
-
addAttribute
Add an attribute to class.- Parameters:
name- Attribute name.type- Attribute data type.flags- Attribute flags such as visibility, storability, etc.
-
addAttribute
Add an attribute to class.- Parameters:
name- Attribute name.type- Attribute data type.
-