|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.CSFactory
public class CSFactory
Contains all the standard subclasses of CS.
TODO: CSFactory should be replaced by CS.newInstance()
CSFactory needs to become a subclass of SimpleList.
It should be a list of default code objects.
Call newInstance() on those code objects to create a new object of that type.
Field Summary | |
---|---|
static java.lang.Class[] |
classes
|
static java.util.Map |
classToString
error: can have more keyword() Strings than CLASSES!!! |
static CSFactory |
defaultFactory
The default CSFactory. |
static java.lang.String[] |
name
|
static java.util.Map |
stringToClass
big-O(1) time to get Class from CS String, or the reverse. |
static java.util.Map<java.lang.String,CS> |
stringToCS
Key is the String returned by the CS's keyword(). |
static CS[] |
trees
|
Constructor Summary | |
---|---|
CSFactory()
|
Method Summary | |
---|---|
static void |
add(CS newClass)
Adds a new subclass of CS that can be instantiated by newCS(). |
static void |
addDefaultClasses()
|
static int |
classCount()
|
static java.lang.Class |
CSClass(java.lang.String CSName)
|
static java.lang.String |
CSName(java.lang.Class CSClass)
error: can have more keyword() Strings than CLASSES!!! |
static CS |
hardCodedNewInstance(java.lang.String instanceOfWhat)
Deprecated. |
static void |
init()
|
static CS |
newCS(int index)
returns a new instance of a subclass of CS. |
static CS |
newInstance(java.lang.String instanceOfWhat)
Returns a new instance of the type of CS with specified CS.keyword(): instanceOfWhat. |
static boolean |
newInstanceWouldWork(java.lang.String instanceOfWhat)
Returns true if newInstance(instanceOfWhat) would return what you asked for, instead of an Err (unless you asked for an Err). |
static CSFactory |
popFactory()
Pops a CSFactory off the stack and returns it. |
static void |
pushFactory(CSFactory pushMe)
Pushes pushMe onto the CSFactory stack |
int |
stackSize()
|
static CSFactory |
topFactory()
Returns the top CSFactory or null if none are on the stack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static CS[] trees
public static java.lang.Class[] classes
public static java.lang.String[] name
public static java.util.Map stringToClass
public static java.util.Map<java.lang.String,CS> stringToCS
public static java.util.Map classToString
public static CSFactory defaultFactory
Constructor Detail |
---|
public CSFactory()
Method Detail |
---|
public static CS newInstance(java.lang.String instanceOfWhat)
@Deprecated public static final CS hardCodedNewInstance(java.lang.String instanceOfWhat)
public static boolean newInstanceWouldWork(java.lang.String instanceOfWhat)
public static void addDefaultClasses()
public static CSFactory topFactory()
public static void pushFactory(CSFactory pushMe)
public int stackSize()
public static CSFactory popFactory()
public static final java.lang.Class CSClass(java.lang.String CSName)
public static final java.lang.String CSName(java.lang.Class CSClass)
public static final int classCount()
public static void init()
public static CS newCS(int index)
public static void add(CS newClass)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |