|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.module.ModuleName
This class represents a module name, e.g, org.moyoman.module.shape.shape1.Shape1. Every ModuleName object is associated with a ModuleType. Only one ModuleName object is instantiated per unique name. The static method getModuleName() is used to retrieve it.
Field Summary | |
private String |
full
The full name. |
private static HashMap |
moduleNames
The key is either the simple or full name, and the value is the ModuleName object. |
private String |
simple
The simple name. |
private ModuleType |
type
The ModuleType with which this object is associated. |
Constructor Summary | |
protected |
ModuleName(String simpleName,
String fullName,
ModuleType moduleType)
Create a new ModuleName object. |
Method Summary | |
boolean |
equals(Object o)
Compare two objects for equality. |
String |
getFullName()
Get the fully qualified name, e.g, org.moyoman.module.shape.shape1.Shape1. |
static ModuleName |
getModuleName(String name)
Get the ModuleName object for the given name. |
ModuleType |
getModuleType()
Return the module type. |
String |
getSimpleName()
The module name, e.g, Shape1. |
int |
hashCode()
Get the hash code for this object. |
String |
toString()
Return a string representation of this object. |
String |
typeAndNameString()
Return a string of the form ModuleType : ModuleName. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static HashMap moduleNames
private ModuleType type
private String simple
private String full
Constructor Detail |
protected ModuleName(String simpleName, String fullName, ModuleType moduleType)
simpleName
- The module name, e.g, Shape1,fullName
- The full module name, e.g, org.moyoman.module.shape.shape1.Shape1.moduleType
- The module type.Method Detail |
public String getFullName()
public String getSimpleName()
public ModuleType getModuleType()
public static ModuleName getModuleName(String name) throws NoSuchDataException
name
- Either the simple or full name.
NoSuchDataException
- Thrown if there is no ModuleName object by that name.public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
o
- The object being compared with this one.
public String typeAndNameString()
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |