|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.facets.FacetHolderImpl
org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract
org.nakedobjects.metamodel.spec.JavaSpecification
public class JavaSpecification
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nakedobjects.metamodel.spec.NakedObjectSpecification |
|---|
NakedObjectSpecification.CreationMode |
| Field Summary |
|---|
| Fields inherited from class org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract |
|---|
fields, fullName, identifier, objectActions, superClassSpecification |
| Constructor Summary | |
|---|---|
JavaSpecification(java.lang.Class<?> cls,
NakedObjectReflectorAbstract reflector,
RuntimeContext runtimeContext)
|
|
| Method Summary | |
|---|---|
void |
addSubclass(NakedObjectSpecification subclass)
Add the class for the specified specification as a subclass of this specification's class. |
void |
clearDirty(NakedObject object)
Clear the dirty flag so that a call to isDirty(), and before markDirty() is called, will return false; |
java.lang.Object |
createObject(NakedObjectSpecification.CreationMode creationMode)
Create and optionally initialize object. |
void |
debugData(DebugString debug)
Debug details describing the object being investigated |
java.lang.String |
debugTitle()
The title for the debug information |
protected NakedObjectAction[] |
getActions(NakedObjectAction[] availableActions,
NakedObjectActionType type)
|
NakedObjectAssociation |
getAssociation(java.lang.String id)
Get the field object representing the field with the specified field identifier. |
java.lang.String |
getDescription()
Returns the description, if any, of the specification. |
java.lang.String |
getIconName(NakedObject reference)
Returns the name of an icon to use for the specified object. |
NakedObjectMember |
getMember(java.lang.reflect.Method method)
|
NakedObjectAction |
getObjectAction(NakedObjectActionType type,
java.lang.String nameParmsIdentityString)
Get the action object represented by the specified identity string. |
NakedObjectAction |
getObjectAction(NakedObjectActionType type,
java.lang.String id,
NakedObjectSpecification[] parameters)
Returns the action of the specified type with the specified signature. |
java.lang.String |
getPluralName()
Returns the plural name for objects of this specification. |
java.lang.String |
getShortName()
Returns the class name without the package. |
java.lang.String |
getSingularName()
Returns the singular name for objects of this specification. |
java.lang.String |
getTitle(NakedObject object)
Returns the title string for the specified object. |
boolean |
hasSubclasses()
Returns true if the subclasses() method will return an array of one or more elements (ie, not an empty array). |
NakedObjectSpecification[] |
interfaces()
Get the list of specifications for all the interfaces that the class represented by this specification implements. |
void |
introspect(FacetDecoratorSet decorator)
Discovers what attributes and behaviour the type specified by this specification. |
boolean |
isAbstract()
|
boolean |
isCollectionOrIsAggregated()
Whether objects of this type are a collection or are intrinsically aggregated. |
boolean |
isDirty(NakedObject object)
Checks if the specified object has been changed, and hence needs persisting. |
boolean |
isFinal()
Whether or not this specification's class is marked as final, that is it may not have subclasses, and hence methods that could be overridden. |
boolean |
isIntrospected()
Added to try to track down a race condition. |
boolean |
isOfType(NakedObjectSpecification specification)
Determines if this class represents the same class, or a subclass, of the specified class. |
boolean |
isService()
|
void |
markAsService()
TODO: should ensure that service has at least one user action; fix when specification knows of its hidden methods. |
void |
markDirty(NakedObject object)
Mark the specified object as having been changed, and hence needing persisting. |
Persistability |
persistability()
Determines if objects of this specification can be persisted or not. |
NakedObjectSpecification[] |
subclasses()
Get the list of specifications for the subclasses of the class represented by this specification |
java.lang.String |
toString()
|
| Methods inherited from class org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract |
|---|
createTitleInteractionContext, createValidityInteractionContext, getAssociationList, getAssociationList, getAssociations, getAssociations, getAuthenticationSession, getCollectionList, getDefaultValue, getFacet, getFullName, getIdentifier, getInstance, getObjectActionList, getObjectActions, getPropertyList, getRuntimeContext, getServiceActions, getServiceActionsFor, isCollection, isEncodeable, isImmutable, isObject, isParseable, isValid, isValidResult, isValueOrIsAggregated, setIntrospected, superclass |
| Methods inherited from class org.nakedobjects.metamodel.facets.FacetHolderImpl |
|---|
addFacet, addFacet, containsFacet, getFacets, getFacetTypes, removeFacet, removeFacet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder |
|---|
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet |
| Constructor Detail |
|---|
public JavaSpecification(java.lang.Class<?> cls,
NakedObjectReflectorAbstract reflector,
RuntimeContext runtimeContext)
| Method Detail |
|---|
public void addSubclass(NakedObjectSpecification subclass)
Hierarchical
addSubclass in interface HierarchicaladdSubclass in class IntrospectableSpecificationAbstractpublic boolean hasSubclasses()
Hierarchical
hasSubclasses in interface HierarchicalhasSubclasses in class IntrospectableSpecificationAbstractpublic NakedObjectSpecification[] interfaces()
Hierarchical
interfaces in interface Hierarchicalinterfaces in class IntrospectableSpecificationAbstractpublic NakedObjectSpecification[] subclasses()
Hierarchical
subclasses in interface Hierarchicalsubclasses in class IntrospectableSpecificationAbstractpublic boolean isOfType(NakedObjectSpecification specification)
isOfType in interface HierarchicalisOfType in class IntrospectableSpecificationAbstractpublic void introspect(FacetDecoratorSet decorator)
IntrospectableSpecificationAs specifications are cyclic (specifically a class will reference its subclasses, which in turn reference their superclass) they need be created first, and then later work out its internals. This allows for cyclic references to the be accommodated as there should always a specification available even though it might not be complete.
introspect in interface IntrospectableSpecificationpublic boolean isIntrospected()
isIntrospected in interface IntrospectableSpecificationisIntrospected in class IntrospectableSpecificationAbstractpublic NakedObjectMember getMember(java.lang.reflect.Method method)
public NakedObjectAssociation getAssociation(java.lang.String id)
NakedObjectAssociationContainer
getAssociation in interface NakedObjectAssociationContainer
public NakedObjectAction getObjectAction(NakedObjectActionType type,
java.lang.String id,
NakedObjectSpecification[] parameters)
NakedObjectActionContainer
getObjectAction in interface NakedObjectActionContainer
public NakedObjectAction getObjectAction(NakedObjectActionType type,
java.lang.String nameParmsIdentityString)
NakedObjectActionContainer
The identity string should be Identifier.toNameParmsIdentityString().
getObjectAction in interface NakedObjectActionContainer
protected NakedObjectAction[] getActions(NakedObjectAction[] availableActions,
NakedObjectActionType type)
getActions in class IntrospectableSpecificationAbstractpublic boolean isCollectionOrIsAggregated()
NakedObjectSpecification
In effect, means has got a CollectionFacet and/or got the AggregatedFacet.
isCollectionOrIsAggregated in interface NakedObjectSpecificationisCollectionOrIsAggregated in class IntrospectableSpecificationAbstractpublic boolean isAbstract()
isAbstract in interface NakedObjectSpecificationisAbstract in class IntrospectableSpecificationAbstractpublic boolean isFinal()
IntrospectableSpecificationAbstractNote - not used at present.
isFinal in class IntrospectableSpecificationAbstractpublic boolean isService()
isService in interface NakedObjectSpecificationisService in class IntrospectableSpecificationAbstractpublic java.lang.String getShortName()
NakedObjectSpecification
getShortName in interface NakedObjectSpecificationpublic java.lang.String getSingularName()
NakedObjectSpecification
getSingularName in interface NakedObjectSpecificationpublic java.lang.String getPluralName()
NakedObjectSpecification
getPluralName in interface NakedObjectSpecificationpublic java.lang.String getDescription()
NakedObjectSpecification
getDescription in interface NakedObjectSpecificationpublic java.lang.String getTitle(NakedObject object)
NakedObjectSpecification
getTitle in interface NakedObjectSpecificationpublic java.lang.String getIconName(NakedObject reference)
NakedObjectSpecification
getIconName in interface NakedObjectSpecificationgetIconName in class IntrospectableSpecificationAbstractpublic Persistability persistability()
NakedObjectSpecificationPersistability.TRANSIENT NakedObject.isPersistent() will indicated
whether the object is persistent or not. If they cannot be persisted then NakedObject.
NakedObjectSpecification.persistability() should be ignored.
persistability in interface NakedObjectSpecificationpersistability in class IntrospectableSpecificationAbstractpublic java.lang.Object createObject(NakedObjectSpecification.CreationMode creationMode)
NakedObjectSpecificationinitialize object.
createObject in interface NakedObjectSpecificationcreateObject in class IntrospectableSpecificationAbstractpublic boolean isDirty(NakedObject object)
Dirtiable
isDirty in interface DirtiableisDirty in class IntrospectableSpecificationAbstractDirtiable.markDirty(NakedObject),
Dirtiable.clearDirty(NakedObject)public void clearDirty(NakedObject object)
Dirtiable
clearDirty in interface DirtiableclearDirty in class IntrospectableSpecificationAbstractDirtiable.isDirty(NakedObject),
Dirtiable.markDirty(NakedObject)public void markDirty(NakedObject object)
Dirtiable
markDirty in interface DirtiablemarkDirty in class IntrospectableSpecificationAbstractDirtiable.isDirty(NakedObject),
Dirtiable.clearDirty(NakedObject)public void markAsService()
if (objectActions != null && objectActions.length == 0) {
throw new NakedObjectSpecificationException("Service object " + getFullName() + " should have at least one user action");
}
markAsService in interface IntrospectableSpecificationpublic void debugData(DebugString debug)
DebugInfo
debugData in interface DebugInfopublic java.lang.String debugTitle()
DebugInfo
debugTitle in interface DebugInfopublic java.lang.String toString()
toString in class IntrospectableSpecificationAbstract
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||