|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.TaskHeap.util.AppInstanceClassEnumerator
public class AppInstanceClassEnumerator
A utility to translate from a base class or interface into possible
class instances.
AUTOGENERATED FILE, DO NOT EDIT DIRECTLY.
source: declared in build
generator: org.sandev.generator.InstClassEnumGenerator
time: Jul 31, 2008 4:34:15 PM
At build time, we have all the classes for the deployment we are currently building. So it is possible to build a lookup structure for every declared class and/or interface, which provides all subinterfaces, implementing classes, and/or subclasses. This lookup structure is captured statically in this class, and the methods traverse the lookup structure to return their results.
This class is primarily intended to support user interfaces, where it is not necessarily clear from the context which class is being referred to. A typical case would be a adding an element to an array that is declared as a superclass or interface. In this case we would need to ask the user what actual instance they want to create.
Because the primary focus of this class is UI disambiguation, only the short names of the classes/interfaces are used. This means that there is a potential for conflict if two interfaces or classes with the same name are being used within the deployment being built. If this happens, the two class/interfaces would be treated as the same, which may or may not be the desired result. It is recommended that deployments avoid using two classes/interfaces with the same basic name in their struct declarations.
| Field Summary | |
|---|---|
static java.lang.String[] |
lnClassNames
|
static java.lang.String[] |
nodeDecls
|
static java.lang.String[] |
persistMessages
|
static java.lang.String[] |
sandCollectionMessages
The types of SandCollectionMessages defined. |
static java.lang.String[] |
sandMessageTypes
The types of messages a SandMessage can resolve into. |
static java.lang.String[] |
sandQueryMessages
The types of SandUpdateMessages defined. |
static java.lang.String[] |
sandUpdateMessages
The types of SandUpdateMessages defined. |
static java.lang.String[] |
shClassNames
|
static java.lang.String[] |
structMessages
|
static java.lang.String[] |
structPrintnames
|
static java.lang.String[] |
structTooltips
|
static java.lang.String[][] |
subClasses
|
| Constructor Summary | |
|---|---|
AppInstanceClassEnumerator()
|
|
| Method Summary | |
|---|---|
protected org.sandev.basics.sandmessages.AggregateUpdate |
aggregateInstance2Update(org.sandev.ui.sandmessages.AggregateUpdateInstance aui)
Translate the given AggregateUpateInstance into an AggregateUpdate |
java.lang.String |
classname2Printname(java.lang.String classname)
Given the classname of a SandStructMessage, return the printname. |
protected org.sandev.basics.structs.SandCollectionMessage |
collInstance2Coll(org.sandev.ui.sandmessages.CollectionInstance ci)
Translate the given CollectionInstance into the corresponding verb message. |
java.lang.String |
getClassLongName(java.lang.String shortClassName)
Return the long name of the class, given the short name. |
java.lang.String[] |
getShortNames(java.lang.String classname)
Given the short name of a class or interface, return the possible matching classes which could be instantiated. |
java.lang.String |
getTooltipText(java.lang.String classname)
Given a classname of a SandStructMessage, return the first sentence of the help, or the empty string if not defined. |
java.lang.String |
printname2Classname(java.lang.String printname)
Given the printname of a SandStructMessage, return the classname. |
protected org.sandev.basics.structs.SandQueryMessage |
queryInstance2Query(org.sandev.ui.sandmessages.QueryInstance qi)
Translate the given QueryInstance into the corresponding verb message. |
org.sandev.basics.structs.SandMessage |
translateVerbInstance(org.sandev.basics.structs.SandMessage sm)
Given a VerbInstance, return the corresponding SandVerbMessage. |
protected org.sandev.basics.structs.SandUpdateMessage |
updateInstance2Update(org.sandev.ui.sandmessages.UpdateInstance ui)
Translate the given UpdateInstance into the corresponding verb message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] shClassNames
public static final java.lang.String[] lnClassNames
public static final java.lang.String[] structMessages
public static final java.lang.String[] structPrintnames
public static final java.lang.String[] structTooltips
public static final java.lang.String[][] subClasses
public static final java.lang.String[] persistMessages
public static final java.lang.String[] nodeDecls
public static final java.lang.String[] sandMessageTypes
public static final java.lang.String[] sandQueryMessages
public static final java.lang.String[] sandCollectionMessages
public static final java.lang.String[] sandUpdateMessages
| Constructor Detail |
|---|
public AppInstanceClassEnumerator()
| Method Detail |
|---|
public java.lang.String getClassLongName(java.lang.String shortClassName)
Note that this only does StructMessages for now, since that is all that is curently required. This is based on the data in the static arrays.
getClassLongName in interface org.sandev.basics.util.InstanceClassEnumeratorpublic java.lang.String[] getShortNames(java.lang.String classname)
Notes:
getShortNames in interface org.sandev.basics.util.InstanceClassEnumeratorpublic java.lang.String classname2Printname(java.lang.String classname)
classname2Printname in interface org.sandev.basics.util.InstanceClassEnumeratorpublic java.lang.String printname2Classname(java.lang.String printname)
printname2Classname in interface org.sandev.basics.util.InstanceClassEnumeratorpublic java.lang.String getTooltipText(java.lang.String classname)
getTooltipText in interface org.sandev.basics.util.InstanceClassEnumerator
public org.sandev.basics.structs.SandMessage translateVerbInstance(org.sandev.basics.structs.SandMessage sm)
throws org.sandev.basics.util.UIFormAdaptorException
translateVerbInstance in interface org.sandev.basics.util.InstanceClassEnumeratororg.sandev.basics.util.UIFormAdaptorException
protected org.sandev.basics.structs.SandQueryMessage queryInstance2Query(org.sandev.ui.sandmessages.QueryInstance qi)
throws org.sandev.basics.util.UIFormAdaptorException
org.sandev.basics.util.UIFormAdaptorException
protected org.sandev.basics.structs.SandCollectionMessage collInstance2Coll(org.sandev.ui.sandmessages.CollectionInstance ci)
throws org.sandev.basics.util.UIFormAdaptorException
org.sandev.basics.util.UIFormAdaptorException
protected org.sandev.basics.structs.SandUpdateMessage updateInstance2Update(org.sandev.ui.sandmessages.UpdateInstance ui)
throws org.sandev.basics.util.UIFormAdaptorException
org.sandev.basics.util.UIFormAdaptorException
protected org.sandev.basics.sandmessages.AggregateUpdate aggregateInstance2Update(org.sandev.ui.sandmessages.AggregateUpdateInstance aui)
throws org.sandev.basics.util.UIFormAdaptorException
org.sandev.basics.util.UIFormAdaptorException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||