sam.rules
Class SyntaxSet

java.lang.Object
  |
  +--sam.rules.SyntaxSet
Direct Known Subclasses:
UnixLikeSyntaxSet

public abstract class SyntaxSet
extends java.lang.Object

Class representing a whole syntax set. This defines how the command-line is parsed into the actual RuleSet

See Also:
Syntax, RuleSet

Field Summary
protected static sam.toolkit.ClassRegistry REGISTRY
          Registry of all defined SyntaxSet Subclasses should include a static statement like
 
Constructor Summary
protected SyntaxSet()
           
 
Method Summary
 java.lang.String example()
          Builds an example of this syntax set.
static sam.rules.SyntaxSet get()
          Builds a new SyntaxSet instance.
 java.lang.String getDeclaredTypes()
          Gets the list of all valid one-char parameter prefixes, as a String
 java.lang.String help()
          Hopefully helps.
 void load(java.util.zip.ZipFile archive)
          Loads syntaxes from specified archive
abstract  java.lang.String name()
          Gets the name of this syntax set
 void parse(java.lang.String[] arguments)
          Parses a command-line and imports specified fields
static boolean set(java.lang.String syntaxSetName)
          Sets the syntax set
 java.lang.String syntax()
          Gets the syntax in an abstract description
abstract  java.util.Enumeration syntaxes()
          Enumerates all Syntax pieces composing this syntax set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGISTRY

protected static final sam.toolkit.ClassRegistry REGISTRY
Registry of all defined SyntaxSet Subclasses should include a static statement like

 static {
   REGISTRY.register(MySyntaxSet.class, "my syntax set");
 }
 

Constructor Detail

SyntaxSet

protected SyntaxSet()
Method Detail

set

public static boolean set(java.lang.String syntaxSetName)
Sets the syntax set


get

public static sam.rules.SyntaxSet get()
Builds a new SyntaxSet instance.


name

public abstract java.lang.String name()
Gets the name of this syntax set


syntaxes

public abstract java.util.Enumeration syntaxes()
Enumerates all Syntax pieces composing this syntax set.


parse

public void parse(java.lang.String[] arguments)
Parses a command-line and imports specified fields


load

public void load(java.util.zip.ZipFile archive)
Loads syntaxes from specified archive


help

public java.lang.String help()
Hopefully helps.


getDeclaredTypes

public java.lang.String getDeclaredTypes()
Gets the list of all valid one-char parameter prefixes, as a String


syntax

public java.lang.String syntax()
Gets the syntax in an abstract description


example

public java.lang.String example()
Builds an example of this syntax set.