Class BshCommandEncoder
java.lang.Object
VASSAL.build.module.BasicCommandEncoder
VASSAL.script.BshCommandEncoder
- All Implemented Interfaces:
Buildable, CommandEncoder
-
Nested Class Summary
Nested classes/interfaces inherited from class BasicCommandEncoder
BasicCommandEncoder.BasicPieceFactory, BasicCommandEncoder.DecoratorFactoryModifier and TypeClassDescriptionstatic interfaceFactory interface for BasicPieces.static interfaceFactory interface for Decorators See: Decorator Pattern, Factory Pattern -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BasicCommandEncoder
add, addTo, build, createBasic, createPiece, decode, encode, getBuildElementModifier and TypeMethodDescriptionvoidAdds a buildable subcomponent.voidAdds this BasicCommandEncoder to its parent, which should be theGameModule.voidBuild a BasicCommandEncoder from the XML buildFile.protected GamePiececreateBasic(String type) Create aGamePieceinstance that is not a Decorator ("Trait").createPiece(String type) Creates a GamePiece instance from the given type information.Deserializes a string into a Basic Piece command (Add, Remove, Change, Move, and...Serializes a Basic Piece command (Add, Remove, Change, Move, and ...getBuildElement(Document doc) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Buildable
isMandatory, isMovable, isUniqueModifier and TypeMethodDescriptiondefault booleanIs this component a reqired component within its parent?default booleanIs this component allowed to be moved around the Configure Tree?default booleanisUnique()Does this component need to be unique within it's parent?
-
Constructor Details
-
BshCommandEncoder
public BshCommandEncoder()
-
-
Method Details
-
createDecorator
Description copied from class:BasicCommandEncoderCreates aDecoratorinstance - aGamePiece"Trait". Modules which wish to provide their own custom classes should subclass BasicCommandEncoder and override this class. The override should check for and parse any definitions that match desired custom Traits(Decorators), and then use super to call this method for any unmatched definitions. Further documentation on creating custom traits appears in BasicCommandEncoder's own javadoc entry, or alternatively at the top of BasicCommandEncoder.java.- Overrides:
createDecoratorin classBasicCommandEncoder- Parameters:
type- the type of the Decorator ("Trait") to be created. Once created, the Decorator should return this value from itsDecorator.myGetType()method.inner- the inner trait/piece of the Decorator (the "innermost" member of a game piece will be aBasicPiece; each successive Trait in the trait list presented in a piece'sdialog represents a sep "outward").invalid reference
PieceDefiner
-