public class CMClass
extends java.lang.ClassLoader
Modifier and Type | Class | Description |
---|---|---|
static class |
CMClass.CMObjectType |
|
protected static class |
CMClass.JScriptLib |
The helper class for full blown JavaScript objects.
|
Modifier and Type | Field | Description |
---|---|---|
protected XVector<Ability> |
abilities |
|
protected static java.util.Map<java.lang.String,Ability> |
ableFinder |
|
protected XVector<Area> |
areaTypes |
|
protected XVector<Armor> |
armor |
|
protected XVector<Behavior> |
behaviors |
|
protected XVector<CharClass> |
charClasses |
|
protected XVector<ClanItem> |
clanItems |
|
protected static java.util.Map<java.lang.String,java.lang.Class<?>> |
classes |
|
protected XVector<Command> |
commands |
|
protected java.util.Hashtable<java.lang.String,Command> |
commandWords |
|
protected java.util.Hashtable<java.lang.String,CMCommon> |
common |
|
protected static boolean |
debugging |
|
protected XVector<Exit> |
exits |
|
protected XVector<Item> |
items |
|
protected static long |
lastUpdateTime |
|
protected XVector<CMLibrary> |
libraries |
|
protected XVector<Room> |
locales |
|
static int |
longestWebMacro |
static int for the web macro object with the longest name, used for web optimization
|
protected static int |
MAX_MOBS |
|
protected static int |
MAX_MSGS |
|
protected XVector<MiscMagic> |
miscMagic |
|
protected static java.util.LinkedList<MOB> |
MOB_CACHE |
|
protected XVector<MOB> |
MOBs |
|
protected static java.util.LinkedList<CMMsg> |
MSGS_CACHE |
|
static CMClass.CMObjectType[] |
OBJECTS_ITEMTYPES |
collection of all object types that are classified as "items" of one sort or another
|
protected XVector<Race> |
races |
|
protected Item |
sampleItem |
|
protected MOB |
sampleMOB |
|
protected MOB |
samplePlayer |
|
protected static java.util.Map<java.lang.String,java.lang.Object> |
syncCache |
|
protected XVector<Technical> |
tech |
|
protected XVector<Weapon> |
weapons |
|
protected java.util.Hashtable<java.lang.String,WebMacro> |
webMacros |
Constructor | Description |
---|---|
CMClass() |
Creates a new instance of the class loader, updating the thread-group ref if necessary.
|
Modifier and Type | Method | Description |
---|---|---|
static java.util.Enumeration<Ability> |
abilities() |
An enumeration of all the stored abilities in this classloader for this
thread
|
static java.util.Enumeration<Ability> |
abilities(Filterer<Ability> f) |
An enumeration of all the stored abilities in this classloader for this
thread
|
static void |
addAllItemClassNames(java.util.List<java.lang.String> namesList,
boolean NonArchon,
boolean NonGeneric,
boolean NonStandard,
int themeCode) |
Fills the given list with the IDs of the various Item types, subject to the given filters
|
static void |
addCharClass(CharClass CR) |
Adds a new character class to the set
|
static boolean |
addClass(CMClass.CMObjectType type,
CMObject O) |
Adds a new prototype of the given object type from your classloader
|
static void |
addRace(Race GR) |
Adds a new Race to the class sets.
|
static java.util.Enumeration<Item> |
allItems() |
An enumeration of all the stored Items in this classloader for this
thread, of all types and subtypes
|
static java.util.Enumeration<Area> |
areaTypes() |
An enumeration of all the stored area Types in this classloader for this
thread
|
static java.util.Enumeration<Armor> |
armor() |
An enumeration of all the stored armor in this classloader for this
thread
|
static java.util.Enumeration<Item> |
basicItems() |
An enumeration of all the stored basic Items in this classloader for this
thread
|
static java.util.Enumeration<Behavior> |
behaviors() |
An enumeration of all the stored behaviors in this classloader for this
thread
|
static CMClass |
c(byte c) |
Returns the CMClass instance tied to the given thread group, or null if not yet created.
|
static java.util.Enumeration<CharClass> |
charClasses() |
An enumeration of all the stored char Classes in this classloader for
this thread
|
static boolean |
checkAncestry(java.lang.Class<?> cl,
java.lang.Class<?> ancestorCl) |
Returns true if the given class implements the given ancestor/interface
|
static boolean |
checkForCMClass(CMClass.CMObjectType classType,
java.lang.String path) |
Returns true if the given class has been loaded into the classloader, or if it is loadable
through the cm class loading system.
|
static java.util.Enumeration<ClanItem> |
clanItems() |
An enumeration of all the stored clan Items in this classloader for this
thread
|
static java.lang.String |
classID(java.lang.Object e) |
Returns the ID() if the object is a CMObject, and otherwise
the simple class name, which is the class name after the final
dot in a class path
|
static java.lang.String |
classPtrStr(java.lang.Object e) |
Returns the address part of an instance objects "default string name", which
looks like com.planet_ink.coffee_mud.blah.ClassName@ab476d87e
where the part after the at sign is the address
|
static java.util.Enumeration<Command> |
commands() |
An enumeration of all the stored commands in this classloader for this
thread
|
static java.util.Enumeration<CMCommon> |
commonObjects() |
An enumeration of all the stored common Objects in this classloader for
this thread
|
static void |
delCharClass(CharClass C) |
Removes the given characterclass from this set
|
static boolean |
delClass(CMClass.CMObjectType type,
CMObject O) |
Deletes the class of the given object type from your classloader
|
static void |
delRace(Race R) |
Removes the given race from this set
|
static boolean |
doesTypeExist(CMClass.CMObjectType typ,
java.lang.String calledThis) |
Returns whether a object with the given coffeemud id can be of the
given type.
|
static boolean |
exists(java.lang.String className) |
Returns whether the given class exists in the vm,
not necessarily any given classloader.
|
static java.util.Enumeration<Exit> |
exits() |
An enumeration of all the stored exits in this classloader for this
thread
|
static Ability |
findAbility(java.lang.String calledThis) |
Searches for an Ability object using the given search term.
|
static Ability |
findAbility(java.lang.String calledThis,
int ofClassDomain,
long ofFlags,
boolean exactOnly) |
Searches for an Ability object using the given search term and filters.
|
static Ability |
findAbility(java.lang.String calledThis,
CharStats charStats) |
Searches for an Ability object using the given search term and filters.
|
static Ability |
findAbility(java.lang.String calledThis,
MOB mob) |
Searches for an Ability object using the given search term and filters.
|
static Behavior |
findBehavior(java.lang.String calledThis) |
Searches for a Behavior object using the given search term.
|
static CharClass |
findCharClass(java.lang.String calledThis) |
Does a search for a Char Class of the given name, first checking
for identical matches, then case insensitive name matches.
|
static Command |
findCommandByTrigger(java.lang.String word,
boolean exactOnly) |
Searches the command prototypes for a trigger word match and returns the command.
|
static CMClass.CMObjectType |
findObjectType(java.lang.String name) |
Searches for a match to the given object type name,
preferring exact, but accepting prefixes.
|
static Race |
findRace(java.lang.String calledThis) |
Does a search for a race of the given name, first checking
for identical matches, then case insensitive name matches.
|
static java.lang.String |
findTypeAncestor(java.lang.String code) |
Searches for a match to the given object type name,
preferring exact, but accepting prefixes.
|
java.lang.Class<?> |
finishDefineClass(java.lang.String className,
byte[] classData,
java.lang.String overPackage,
boolean resolveIt) |
Finishes loading the class into the underlying classloader by handing the byte data to
the classloader, after building a proper full class name.
|
static Ability |
getAbility(int x) |
Returns a numbered available ability prototype from your classloader
|
static Ability |
getAbility(java.lang.String calledThis) |
Returns a new instance of a ability object of the given ID from your
classloader
|
static Ability |
getAbility(java.lang.String calledThis,
java.lang.String miscText) |
Returns a new instance of a ability object of the given ID from your
classloader and lets you set the misc text
|
static Ability |
getAbilityByName(java.lang.String calledThis,
boolean exact) |
Searches for an Ability object using the given search term.
|
static Ability |
getAbilityPrototype(java.lang.String calledThis) |
Returns the prototype instance of the ability object of the given ID from
your classloader
|
static Area |
getAreaType(java.lang.String calledThis) |
Returns a new instance of a area object of the given ID from your
classloader
|
static Armor |
getArmor(java.lang.String calledThis) |
Returns a new instance of a armor object of the given ID from your
classloader
|
static Item |
getBasicItem(java.lang.String calledThis) |
Returns a new instance of a basic item object of the given ID from your
classloader
|
static Behavior |
getBehavior(java.lang.String calledThis) |
Returns a new instance of a behavior object of the given ID from your
classloader
|
static Behavior |
getBehaviorByName(java.lang.String calledThis,
boolean exact) |
Searches for a Behavior object using the given search term and filters.
|
static CMObject |
getByType(java.lang.String ID,
CMClass.CMObjectType type) |
Returns a newInstance of an object of the given type and ID.
|
static CharClass |
getCharClass(java.lang.String calledThis) |
Returns a reference to the prototype for the char class of the given ID
from your classloader
|
static ClanItem |
getClanItem(java.lang.String calledThis) |
Returns a new instance of a clan item object of the given ID from your
classloader
|
static CMFile |
getClassDir(java.lang.Class<?> C) |
Given a class, this method will return a CMFile object for the directory containing
that class.
|
protected static java.lang.Object |
getClassSet(CMClass.CMObjectType code) |
|
protected static java.lang.Object |
getClassSet(java.lang.String type) |
|
static Command |
getCommand(java.lang.String word) |
Returns a reference to the prototype for the command of the given ID from
your classloader
|
static CMCommon |
getCommon(java.lang.String calledThis) |
Returns a new instance of a common object of the given ID from your
classloader
|
static CMCommon |
getCommonPrototype(java.lang.String calledThis) |
Returns the prototype instance of a common object of the given ID from
your classloader
|
static Exit |
getExit(java.lang.String calledThis) |
Returns a new instance of a exit object of the given ID from your
classloader
|
static MOB |
getFactoryMOB() |
Returns either a StdFactoryMOB object from the cache, if one is available, or makes
a new one.
|
static MOB |
getFactoryMOB(java.lang.String name,
int level,
Room room) |
Returns either a StdFactoryMOB object from the cache, if one is available, or makes
a new one, giving him the name, level, and room location given.
|
static CMObject |
getGlobal(java.util.List<? extends CMObject> list,
java.lang.String ID) |
Returns the prototype of the cmobject of the given id from the given list
|
static CMObject |
getGlobal(java.util.Map<java.lang.String,? extends CMObject> list,
java.lang.String ID) |
Given a map of CMObjects with ID()s defined, this will return the one matched by the given class name.
|
static Item |
getItem(java.lang.String calledThis) |
Returns a new instance of an item object of the given ID from your classloader
Will search basic, armor, weapons, misc magic, clan items, and misc tech respectively
|
static Item |
getItemPrototype(java.lang.String itemID) |
Returns a reference to the prototype of an item object of the given ID from your classloader
Will search basic, armor, weapons, misc magic, clan items, and misc tech respectively
|
static long |
getLastClassUpdatedTime() |
Returns a timestamp of the last time there was a change in the full set of classes.
|
static CMLibrary |
getLibrary(java.lang.String calledThis) |
Returns a reference to the prototype for the library of the given ID from
your classloader
|
static java.lang.Object |
getLoadNewClassInstance(CMClass.CMObjectType classType,
java.lang.String path,
boolean quiet) |
If the given class exists in the classloader, a new instance will be returned.
|
static Room |
getLocale(java.lang.String calledThis) |
Returns a new instance of a locale object of the given ID from your
classloader
|
static Room |
getLocalePrototype(java.lang.String calledThis) |
Returns the prototype instance of a locale object of the given ID from your
classloader
|
static Item |
getMiscMagic(java.lang.String calledThis) |
Returns a new instance of a misc magic object of the given ID from your
classloader
|
static MOB |
getMOB(java.lang.String calledThis) |
Returns a new instance of a MOB object of the given ID from your
classloader
|
static MOB |
getMOBPrototype(java.lang.String mobID) |
Returns a reference to the prototype of a mob object of the given ID from your classloader
|
static CMMsg |
getMsg() |
Returns either a CMMsg object from the cache, if one is available, or makes
a new one.
|
static CMMsg |
getMsg(MOB source,
int newAllCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
int newAllCode,
java.lang.String allMessage,
int newValue) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
Environmental target,
int newAllCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
Environmental target,
Environmental tool,
int newSourceCode,
int newTargetCode,
int newOthersCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
Environmental target,
Environmental tool,
int newAllCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
Environmental target,
Environmental tool,
int newSourceCode,
java.lang.String sourceMessage,
int newTargetCode,
java.lang.String targetMessage,
int newOthersCode,
java.lang.String othersMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMMsg |
getMsg(MOB source,
Environmental target,
Environmental tool,
int newAllCode,
java.lang.String sourceMessage,
java.lang.String targetMessage,
java.lang.String othersMessage) |
Creates and configures a CMMsg object for use in the game
|
static CMObject |
getNewGlobal(java.util.List<? extends CMObject> list,
java.lang.String ID) |
Returns a new instance of the cmobject of the given id from the given list
|
static CMObject |
getNewGlobal(java.util.Map<java.lang.String,? extends CMObject> list,
java.lang.String ID) |
Given a map of CMObjects with ID()s defined, this will return the one matched by the given ID.
|
static java.lang.Object |
getObjectOrPrototype(java.lang.String calledThis) |
Returns either a new instance of the class of the given full java name,
or the coffeemud prototype of the class with the given id.
|
static CMClass.CMObjectType |
getObjectType(java.lang.Object O) |
Returns the internal object type to which the given object example
belongs by checking its interface implementations/ancestry
|
static java.lang.String |
getObjInstanceStr(Environmental E) |
This strange method returns an environmentals name,
plus a string of instance hex digits, which I guess make
the name more unique.
|
static CMObject |
getPrototypeByID(CMClass.CMObjectType type,
java.lang.String calledThis) |
Returns the base prototype of the given type, by id
|
static Race |
getRace(java.lang.String calledThis) |
Returns a reference to the prototype for the race of the given ID from
your classloader
|
static Ability |
getRawAbility(java.lang.String calledThis) |
Returns a new instance of a ability object of the given ID from your
classloader, and ignores default arguments.
|
static java.lang.String |
getSimpleClassName(java.lang.Class<?> C) |
Returns the simple class name of a class -- basically the name that comes
after the final "." in a classpath.
|
static java.lang.String |
getSimpleClassName(java.lang.Object O) |
Returns the simple class name of an object -- basically the name that comes
after the final "." in a classpath.
|
static java.lang.Object |
getSync(java.lang.String key) |
|
static Item |
getTech(java.lang.String calledThis) |
Returns a new instance of a misc tech object of the given ID from your
classloader
|
static CMClass.CMObjectType |
getType(java.lang.Object O) |
Returns the object type of the given object
|
static CMClass.CMObjectType |
getTypeByNameOrOrdinal(java.lang.Object nameOrOrdinal) |
Given a string, Integer, or some other stringable object, this will return the
cmobjecttype based on its name or ordinal relationship.
|
static Environmental |
getUnknown(java.lang.String calledThis) |
Returns a new instance of a Environmental of the given id, prefers items,
but also checks mobs and abilities as well.
|
static CMClass.CMObjectType |
getUnknownType(java.lang.String calledThis) |
Returns the most preferred object type for the given coffeemud ID
|
static Weapon |
getWeapon(java.lang.String calledThis) |
Returns a new instance of a weapon object of the given ID from your
classloader
|
static WebMacro |
getWebMacro(java.lang.String macroName) |
Returns a reference to the prototype for the web macro of the given ID
from your classloader
|
static CMClass |
initialize() |
Creates and returns a new CMClass object for the current calling thread
|
static CMClass |
instance() |
Returns the CMClass instance tied to this particular thread group, or null if not yet created.
|
void |
intializeClasses() |
Initializes ALL the internal classes in these sets.
|
static boolean |
isLanguage(java.lang.String ID) |
Returns whether the given string is a language ID
from the official classes load.
|
static boolean |
isType(java.lang.Object O,
CMClass.CMObjectType type) |
Checks the given object against the given object type
|
static java.util.Enumeration<CMLibrary> |
libraries() |
An enumeration of all the stored races in this classloader for this
thread
|
static boolean |
loadAllCoffeeMudClasses(CMProps page) |
Making good use of the class path directories from the INI file, this will load
all the damn classes in coffeemud, being nice enough to report them to the log
as it does so
|
static boolean |
loadClass(CMClass.CMObjectType classType,
java.lang.String path,
boolean quiet) |
Loads the class with the given coffeemud or java path to your classloader.
|
java.lang.Class<?> |
loadClass(java.lang.String className) |
Attempts to load the given class, by fully qualified name
|
java.lang.Class<?> |
loadClass(java.lang.String className,
boolean resolveIt) |
Attempts to load the given class, by fully qualified name.
|
static java.util.Vector<java.lang.Object> |
loadClassList(java.lang.String defaultPath,
java.lang.String requestedPathList,
java.lang.String subDir,
java.lang.Class<?> ancestorC1,
boolean quiet) |
Given the "stock" default path to a set of coffeemud classes, and a potential set of requested paths, this
method will follow requested paths (observing the default if default is listed in the request paths), and
load all the coffeemud classes therein, making sure they respect the given interface/ancestor class.
|
static java.util.Hashtable |
loadHashListToObj(java.lang.String defaultPath,
java.lang.String requestedPathList,
java.lang.String ancestor) |
Given the "stock" default path to a set of coffeemud classes, and a potential set of requested paths, this
method will follow requested paths (observing the default if default is listed in the request paths), and
load all the coffeemud classes therein, making sure they respect the given interface/ancestor name.
|
static boolean |
loadListToObj(java.lang.Object collection,
java.lang.String filePath,
java.lang.Class<?> ancestorCl,
boolean quiet) |
Given a java collection type of some sort (hashtable, vector, etc), a file path,
and the class of an interface/ancestor that classes must implement, this method will load all classes
in the appropriate path into the given collection.
|
static boolean |
loadListToObj(java.lang.Object collection,
java.lang.String filePath,
java.lang.String ancestor,
boolean quiet) |
Given a java collection type of some sort (hashtable, vector, etc), a file path,
and the name of an interface/ancestor that classes must implement, this method will load all classes
in the appropriate path into the given collection.
|
static boolean |
loadObjectListToObj(java.lang.Object collection,
java.lang.String defaultPath,
java.lang.String path,
java.lang.String ancestor) |
Given a java collection type of some sort (hashtable, vector, etc), a default path, a requested path,
and the name of an interface/ancestor that classes must implement, this method will load all classes
in the appropriate path into the given collection.
|
static XVector |
loadVectorListToObj(java.lang.String defaultPath,
java.lang.String requestedPathList,
java.lang.String ancestor) |
Given the "stock" default path to a set of coffeemud classes, and a potential set of requested paths, this
method will follow requested paths (observing the default if default is listed in the request paths), and
load all the coffeemud classes therein, making sure they respect the given interface/ancestor name.
|
static java.util.Enumeration<Room> |
locales() |
An enumeration of all the stored locales in this classloader for this
thread
|
protected static java.lang.String |
makeDotClassPath(java.lang.String path) |
|
protected static java.lang.String |
makeFilePath(java.lang.String path) |
|
static java.util.Enumeration<MiscMagic> |
miscMagic() |
An enumeration of all the stored misc Magic in this classloader for this
thread
|
static java.util.Enumeration<MiscMagic> |
miscMagic(Filterer<MiscMagic> f) |
An enumeration of all the stored misc Magic in this classloader for this
thread
|
static java.util.Enumeration<MOB> |
mobTypes() |
An enumeration of all the stored mob Types in this classloader for this
thread
|
static int |
numPrototypes(CMClass.CMObjectType type) |
Returns the total number of template/prototypes of the given type stored by
this CMClass instance.
|
static int |
numPrototypes(CMClass.CMObjectType[] types) |
Returns the number of prototypes in the classloader of the given set of types
|
static java.util.Enumeration<Race> |
races() |
An enumeration of all the stored races in this classloader for this thread
|
static Ability |
randomAbility() |
Returns a random available ability prototype from your classloader
|
static Area |
randomArea() |
Returns a random available area prototype from your classloader
|
static Item |
randomBasicItemPrototype() |
Returns a random available basic item prototype from your classloader
|
static CharClass |
randomCharClass() |
Returns a random available char class prototype from your classloader
|
static Race |
randomRace() |
Returns a random available race prototype from your classloader
|
protected static void |
reloadCommandWords() |
Causes the map of command words associated with command objects
to be re-mapped, so that users can use them.
|
static boolean |
returnMob(MOB mob) |
Factory mob objects are normally re-used, and this method is the recycle bin.
|
static boolean |
returnMsg(CMMsg msg) |
CMMsg objects are normally re-used, and this method is the recycle bin.
|
static Item |
sampleItem() |
Returns the saved copy of the first basic item prototype
|
static MOB |
sampleMOB() |
Returns the saved copy of the first mob prototype
|
static MOB |
samplePlayer() |
Returns the saved copy of the first mob prototype as a player
|
static void |
shutdown() |
Unloads all the classes in this system.
|
static void |
sortCMObjectsByID(java.util.List<CMObject> V) |
Given a list of CMObjects, this will sort them, by
CMObject.ID() |
static void |
sortEnvironmentalsByName(java.util.List<? extends Environmental> V) |
Given a list of environmentals, this will sort them by
CMObject.ID() |
static java.util.Enumeration<Technical> |
tech() |
An enumeration of all the stored misc Tech in this classloader for this
thread
|
static java.util.Enumeration<Technical> |
tech(Filterer<Technical> f) |
An enumeration of all the stored misc Tech in this classloader for this
thread
|
static int |
totalClasses() |
Returns the total number of prototypes of all classes in your classloader
|
protected int |
totalLocalClasses() |
|
void |
unload() |
Clears all the class sets in this loader.
|
static java.util.Enumeration<Weapon> |
weapons() |
An enumeration of all the stored weapons in this classloader for this
thread
|
static java.util.Enumeration<WebMacro> |
webmacros() |
An enumeration of all the stored webmacros in this classloader for this
thread
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected static boolean debugging
protected static volatile long lastUpdateTime
protected static final java.util.Map<java.lang.String,java.lang.Class<?>> classes
protected static final java.util.Map<java.lang.String,Ability> ableFinder
protected static final java.util.Map<java.lang.String,java.lang.Object> syncCache
public static final CMClass.CMObjectType[] OBJECTS_ITEMTYPES
public static int longestWebMacro
protected java.util.Hashtable<java.lang.String,CMCommon> common
protected java.util.Hashtable<java.lang.String,WebMacro> webMacros
protected java.util.Hashtable<java.lang.String,Command> commandWords
protected static final java.util.LinkedList<CMMsg> MSGS_CACHE
protected static final java.util.LinkedList<MOB> MOB_CACHE
protected static final int MAX_MSGS
protected static final int MAX_MOBS
protected Item sampleItem
protected MOB sampleMOB
protected MOB samplePlayer
public CMClass()
public static final CMClass initialize()
public static CMClass c(byte c)
c
- the code for the thread group to return (0-255)public static CMClass instance()
public static final boolean exists(java.lang.String className)
className
- a fully qualified java class name.public static final boolean isType(java.lang.Object O, CMClass.CMObjectType type)
O
- the object to inspecttype
- the type to compare againstCMClass.CMObjectType
public static final CMObject getByType(java.lang.String ID, CMClass.CMObjectType type)
ID
- the ID of the object to look fortype
- the type of object to checkCMClass.CMObjectType
public static final CMClass.CMObjectType getType(java.lang.Object O)
O
- the object to inspectCMClass.CMObjectType
public static CMClass.CMObjectType getTypeByNameOrOrdinal(java.lang.Object nameOrOrdinal)
nameOrOrdinal
- the string, integer, or whatever objectCMClass.CMObjectType
protected static final java.lang.Object getClassSet(java.lang.String type)
protected static final java.lang.Object getClassSet(CMClass.CMObjectType code)
public static final int numPrototypes(CMClass.CMObjectType type)
type
- the type of object to countCMClass.CMObjectType
public static final java.util.Enumeration<Race> races()
public static final java.util.Enumeration<CMCommon> commonObjects()
public static final java.util.Enumeration<CharClass> charClasses()
public static final java.util.Enumeration<MOB> mobTypes()
public static final java.util.Enumeration<CMLibrary> libraries()
public static final java.util.Enumeration<Room> locales()
public static final java.util.Enumeration<Exit> exits()
public static final java.util.Enumeration<Behavior> behaviors()
public static final java.util.Enumeration<Item> basicItems()
public static final java.util.Enumeration<Weapon> weapons()
public static final java.util.Enumeration<Armor> armor()
public static final java.util.Enumeration<MiscMagic> miscMagic()
public static final java.util.Enumeration<Item> allItems()
public static final java.util.Enumeration<MiscMagic> miscMagic(Filterer<MiscMagic> f)
f
- the filterer to help select which ones you wantpublic static final java.util.Enumeration<Technical> tech()
public static final java.util.Enumeration<Technical> tech(Filterer<Technical> f)
f
- the filterer to help select which ones you wantpublic static final java.util.Enumeration<ClanItem> clanItems()
public static final java.util.Enumeration<Area> areaTypes()
public static final java.util.Enumeration<Command> commands()
public static final java.util.Enumeration<Ability> abilities()
public static final java.util.Enumeration<Ability> abilities(Filterer<Ability> f)
f
- the filterer to help select which ones you wantpublic static final java.util.Enumeration<WebMacro> webmacros()
public static final Race randomRace()
public static final Item randomBasicItemPrototype()
public static final CharClass randomCharClass()
public static final Ability randomAbility()
public static final Ability getAbility(int x)
x
- the index number of the ability to getpublic static final Area randomArea()
public static final Room getLocale(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Room getLocalePrototype(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final CMLibrary getLibrary(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Area getAreaType(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Exit getExit(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final MOB getMOB(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Weapon getWeapon(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final ClanItem getClanItem(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Item getMiscMagic(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Item getTech(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Armor getArmor(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Item getBasicItem(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Behavior getBehavior(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Ability getAbility(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Ability getRawAbility(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Ability getAbility(java.lang.String calledThis, java.lang.String miscText)
calledThis
- the ID() of the object to returnmiscText
- the misc text to give the abilitypublic static final Ability getAbilityPrototype(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final CharClass getCharClass(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final CMCommon getCommon(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final CMCommon getCommonPrototype(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Command getCommand(java.lang.String word)
word
- the ID() of the object to returnpublic static final WebMacro getWebMacro(java.lang.String macroName)
macroName
- the ID() of the object to returnpublic static final Race getRace(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final int numPrototypes(CMClass.CMObjectType[] types)
types
- the types to countpublic static final void addAllItemClassNames(java.util.List<java.lang.String> namesList, boolean NonArchon, boolean NonGeneric, boolean NonStandard, int themeCode)
namesList
- the list to populate with IDsNonArchon
- true to not include Archon itemsNonGeneric
- true to not include Gen itemsNonStandard
- true to not include Standard itemsthemeCode
- the theme mask to respect, sortofpublic static Item getItem(java.lang.String calledThis)
calledThis
- the ID() of the object to returnpublic static final Item sampleItem()
public static final Item getItemPrototype(java.lang.String itemID)
itemID
- the ID() of the object to returnpublic static final MOB getMOBPrototype(java.lang.String mobID)
mobID
- the ID() of the object to returnpublic static final MOB sampleMOB()
public static final MOB samplePlayer()
public static final Command findCommandByTrigger(java.lang.String word, boolean exactOnly)
word
- the command word to search forexactOnly
- true for a whole word match, false for a startsWith matchprotected final int totalLocalClasses()
public static final int totalClasses()
public static final boolean delClass(CMClass.CMObjectType type, CMObject O)
type
- the type of object that the given object belongs toO
- the specific prototype class to removepublic static final boolean addClass(CMClass.CMObjectType type, CMObject O)
type
- the type of object that the given object belongs toO
- the specific prototype class to addpublic static final CMClass.CMObjectType findObjectType(java.lang.String name)
name
- the object type name to search forpublic static final java.lang.String findTypeAncestor(java.lang.String code)
code
- the object type name to search forpublic static final CMClass.CMObjectType getObjectType(java.lang.Object O)
O
- the object to find the type ofpublic static final boolean loadClass(CMClass.CMObjectType classType, java.lang.String path, boolean quiet)
classType
- the type of object to loadpath
- the file or java path of the class to loadquiet
- true to not report errors to the log, false otherwiseprotected static java.lang.String makeDotClassPath(java.lang.String path)
protected static java.lang.String makeFilePath(java.lang.String path)
public static final java.lang.Object getLoadNewClassInstance(CMClass.CMObjectType classType, java.lang.String path, boolean quiet)
classType
- the type of class as a filterpath
- the path of some sort to get a new instance ofquiet
- true to not post errors to the log, false otherwisepublic static final boolean checkForCMClass(CMClass.CMObjectType classType, java.lang.String path)
classType
- the type of class to check for (for ancestry confirmation)path
- the path of the class to check forpublic static final CMObject getPrototypeByID(CMClass.CMObjectType type, java.lang.String calledThis)
type
- the cmobjecttype to returncalledThis
- the ID of the cmobjecttypepublic static final java.lang.Object getObjectOrPrototype(java.lang.String calledThis)
calledThis
- the ID or the given full java name.public static final Environmental getUnknown(java.lang.String calledThis)
calledThis
- the id of the cmobjectpublic static CMClass.CMObjectType getUnknownType(java.lang.String calledThis)
calledThis
- the coffeemud IDpublic static boolean doesTypeExist(CMClass.CMObjectType typ, java.lang.String calledThis)
typ
- the type of object to checkcalledThis
- the coffeemud IDpublic static final Race findRace(java.lang.String calledThis)
calledThis
- the name or idpublic static final CharClass findCharClass(java.lang.String calledThis)
calledThis
- the name or idpublic static final CMObject getNewGlobal(java.util.List<? extends CMObject> list, java.lang.String ID)
list
- the list to search, must be alphabetizedID
- the perfect cmobject ID of the objectpublic static final CMObject getGlobal(java.util.List<? extends CMObject> list, java.lang.String ID)
list
- the list to search, must be alphabetizedID
- the perfect cmobject ID of the objectpublic static final Ability findAbility(java.lang.String calledThis)
calledThis
- the search term to usepublic static final Ability findAbility(java.lang.String calledThis, int ofClassDomain, long ofFlags, boolean exactOnly)
calledThis
- the search term to useofClassDomain
- a class/domain filter, or -1 to skipofFlags
- an ability flag filter, or -1 to skipexactOnly
- true to match only case-insensitive whole strings, false otherwisepublic static final Behavior findBehavior(java.lang.String calledThis)
calledThis
- the search term to usepublic static final Behavior getBehaviorByName(java.lang.String calledThis, boolean exact)
calledThis
- the search term to useexact
- true for whole string match, false otherwisepublic static final Ability getAbilityByName(java.lang.String calledThis, boolean exact)
calledThis
- the search term to useexact
- true for whole string match, false otherwisepublic static final Ability findAbility(java.lang.String calledThis, CharStats charStats)
calledThis
- the search term to usecharStats
- only the abilities qualified for by the classes hereinpublic static final Ability findAbility(java.lang.String calledThis, MOB mob)
calledThis
- the search term to usemob
- the dude to searchpublic static final CMObject getNewGlobal(java.util.Map<java.lang.String,? extends CMObject> list, java.lang.String ID)
list
- the map of IDs to objectsID
- the ID to search forpublic static final CMObject getGlobal(java.util.Map<java.lang.String,? extends CMObject> list, java.lang.String ID)
list
- the map of IDs to objectsID
- the ID to search forpublic static final void addRace(Race GR)
GR
- the race to addpublic static final void addCharClass(CharClass CR)
CR
- the character class to addpublic static final void delCharClass(CharClass C)
C
- the character class to removepublic static final void delRace(Race R)
R
- the race to removepublic static final void sortCMObjectsByID(java.util.List<CMObject> V)
CMObject.ID()
V
- the list of objects to sort.public static final void sortEnvironmentalsByName(java.util.List<? extends Environmental> V)
CMObject.ID()
V
- the list of environmentalspublic final void intializeClasses()
public static java.util.Hashtable loadHashListToObj(java.lang.String defaultPath, java.lang.String requestedPathList, java.lang.String ancestor)
defaultPath
- the path to use when default is a requested pathrequestedPathList
- the ; separated list of paths to look for classes inancestor
- the full class name of an acester/interfacepublic static final XVector loadVectorListToObj(java.lang.String defaultPath, java.lang.String requestedPathList, java.lang.String ancestor)
defaultPath
- the path to use when default is a requested pathrequestedPathList
- the ; separated list of paths to look for classes inancestor
- the full class name of an acester/interfacepublic static final java.util.Vector<java.lang.Object> loadClassList(java.lang.String defaultPath, java.lang.String requestedPathList, java.lang.String subDir, java.lang.Class<?> ancestorC1, boolean quiet)
defaultPath
- the path to use when default is a requested pathrequestedPathList
- the ; separated list of paths to look for classes inancestorC1
- the full class of an acester/interfacesubDir
- if given, this will be appended to all requested paths except defaultquiet
- true to not report errors to the log, false otherwisepublic static final boolean loadObjectListToObj(java.lang.Object collection, java.lang.String defaultPath, java.lang.String path, java.lang.String ancestor)
collection
- the collection type to use (map, list, set, etc, etc)defaultPath
- the path to use if the given path requests the default pathpath
- the requested path to useancestor
- the full java class name of an interface ancestor to force classes to respectpublic static final boolean loadListToObj(java.lang.Object collection, java.lang.String filePath, java.lang.String ancestor, boolean quiet)
collection
- the collection type to use (map, list, set, etc, etc)filePath
- the path to look for classes inancestor
- the full java class name of an interface ancestor to force classes to respectquiet
- true to not report errors, false otherwisepublic static final boolean loadListToObj(java.lang.Object collection, java.lang.String filePath, java.lang.Class<?> ancestorCl, boolean quiet)
collection
- the collection type to use (map, list, set, etc, etc)filePath
- the path to look for classes inancestorCl
- the full java class of an interface ancestor to force classes to respectquiet
- true to not report errors, false otherwisepublic static final java.lang.String getObjInstanceStr(Environmental E)
E
- the environmenal to make a unique name forpublic static final java.lang.String getSimpleClassName(java.lang.Object O)
O
- the object to get the name forpublic static final java.lang.String getSimpleClassName(java.lang.Class<?> C)
C
- the class to get the name forpublic static final CMFile getClassDir(java.lang.Class<?> C)
C
- the class to get a directory forpublic static final boolean checkAncestry(java.lang.Class<?> cl, java.lang.Class<?> ancestorCl)
cl
- the class to checkancestorCl
- the ancestor/interfacepublic static final java.lang.String classPtrStr(java.lang.Object e)
e
- the object to get an address forpublic static final java.lang.String classID(java.lang.Object e)
e
- the object to get a simple class name for.public final java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
className
- the class namejava.lang.ClassNotFoundException
- something went wrongpublic final java.lang.Class<?> finishDefineClass(java.lang.String className, byte[] classData, java.lang.String overPackage, boolean resolveIt) throws java.lang.ClassFormatError
className
- the class nameclassData
- the byte data of the class to loadoverPackage
- the package the class belongs toresolveIt
- true to link the class, false if this is a drilljava.lang.ClassFormatError
- something went wrongpublic final java.lang.Class<?> loadClass(java.lang.String className, boolean resolveIt) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
className
- the class nameresolveIt
- true to link the class, false if this is a drilljava.lang.ClassNotFoundException
- something went wrongpublic static final boolean isLanguage(java.lang.String ID)
ID
- the ability ID to checkprotected static final void reloadCommandWords()
public static final boolean loadAllCoffeeMudClasses(CMProps page)
page
- the coffeemud.ini filepublic static long getLastClassUpdatedTime()
public static final boolean returnMsg(CMMsg msg)
msg
- the CMMsg we are done usingpublic static final CMMsg getMsg()
public static final CMMsg getMsg(MOB source, int newAllCode, java.lang.String allMessage)
source
- the agent source of the actionnewAllCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendCMMsg.source()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public static final CMMsg getMsg(MOB source, int newAllCode, java.lang.String allMessage, int newValue)
source
- the agent source of the actionnewAllCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendnewValue
- the value to set on the messageCMMsg.source()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
,
CMMsg.value()
public static final CMMsg getMsg(MOB source, Environmental target, int newAllCode, java.lang.String allMessage)
source
- the agent source of the actiontarget
- the target of the actionnewAllCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendCMMsg.source()
,
CMMsg.target()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public static final CMMsg getMsg(MOB source, Environmental target, Environmental tool, int newAllCode, java.lang.String allMessage)
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionnewAllCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendCMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public static final CMMsg getMsg(MOB source, Environmental target, Environmental tool, int newSourceCode, int newTargetCode, int newOthersCode, java.lang.String allMessage)
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionnewSourceCode
- the source code for this actionnewTargetCode
- the target code for this actionnewOthersCode
- the others/observed code for this actionallMessage
- the source, target, and others string msg to sendCMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.targetCode()
,
CMMsg.othersCode()
,
CMMsg.sourceMessage()
public static final CMMsg getMsg(MOB source, Environmental target, Environmental tool, int newAllCode, java.lang.String sourceMessage, java.lang.String targetMessage, java.lang.String othersMessage)
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionnewAllCode
- the source, target, and others code to usesourceMessage
- the action/message as seen by the sourcetargetMessage
- the action/message as seen by the targetothersMessage
- the action/message as seen by everyone elseCMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
,
CMMsg.targetMessage()
,
CMMsg.othersMessage()
public static final CMMsg getMsg(MOB source, Environmental target, Environmental tool, int newSourceCode, java.lang.String sourceMessage, int newTargetCode, java.lang.String targetMessage, int newOthersCode, java.lang.String othersMessage)
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionnewSourceCode
- the source code for this actionsourceMessage
- the action/message as seen by the sourcenewTargetCode
- the target code for this actiontargetMessage
- the action/message as seen by the targetnewOthersCode
- the others/observed code for this actionothersMessage
- the action/message as seen by everyone elseCMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.targetCode()
,
CMMsg.othersCode()
,
CMMsg.sourceMessage()
,
CMMsg.targetMessage()
,
CMMsg.othersMessage()
public static final boolean returnMob(MOB mob)
mob
- the mob we are done usingpublic static final java.lang.Object getSync(java.lang.String key)
public static final MOB getFactoryMOB()
public static final MOB getFactoryMOB(java.lang.String name, int level, Room room)
name
- the name to give the moblevel
- the level to give the mobroom
- the room to set the mobs location atpublic static final void shutdown()
public final void unload()