public class ClassDefinition extends ClassDefinitionDMW
metanamecore| Modifier | Constructor and Description |
|---|---|
|
ClassDefinition()
Default constructor.
|
|
ClassDefinition(ClassDefinitionDMO obj) |
|
ClassDefinition(ClassDefinitionDMO obj,
DmcClassInfo dci) |
protected |
ClassDefinition(String mn)
Default constructor used in creating the meta schema.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImportsForAdditionalAttributes(SchemaManager sm,
ImportManager imports,
DmcUncheckedObject uco)
This method is used in conjunction with the rule instantiation mechanisms.
|
void |
adjustJavaClass()
Complicated stuff to handle generation of wrapper classes in packages other than where
the DMOs are generated.
|
void |
adjustJavaClass(String genContext,
String genSuffix)
Complicated stuff to handle generation of wrapper classes in packages other than where
the DMOs are generated for different generation contexts.
|
boolean |
allowsParent(ClassDefinition parent)
Checks if the specified class of object is a valid parent for this class of object.
|
int |
derivationDepth() |
boolean |
generateWrapper(String context)
Determines whether or not we want to generate a wrapper for this class of object
in the specified context.
|
TreeMap<DefinitionName,AttributeDefinition> |
getAllAttributesAtThisLevel() |
TreeMap<DefinitionName,ClassDefinition> |
getAllDerived()
Returns the allderived variable which holds a Hashmap of all
classes that derive from this class
|
ArrayList<ClassDefinition> |
getAllImplemented()
Returns all implemented interfaces.
|
ArrayList<ClassDefinition> |
getAllImplementors() |
TreeMap<DefinitionName,AttributeDefinition> |
getAllMay() |
TreeMap<DefinitionName,AttributeDefinition> |
getAllMust() |
TreeMap<DefinitionName,ClassDefinition> |
getAllowedSubcomps()
Returns the set of allowed subcomponents for this class.
|
ArrayList<ClassDefinition> |
getBaseClasses()
Returns the complete set of base classes from which this class is derived.
|
DmcClassInfo |
getClassInfo() |
Iterator<RuleDataDMO> |
getClassRules() |
void |
getDerivedClassesDepthFirst(ArrayList<ClassDefinition> classes)
This method will add this class to the classes array and then be called recursively
for all derived classes.
|
String |
getDMWPackage()
If the schema in which this class is defined has a dmwPackage attribute defined, this
function returns that value.
|
String |
getDmwPackage(String context) |
WrapperTypeEnum |
getDmwWrapperType(String context) |
DmcClassInfo |
getDynamicClassInfo() |
TreeMap<DefinitionName,AttributeDefinition> |
getFullAttrMap() |
String |
getShortestName()
Returns the shortest possible name for this class definition.
|
AttributeDefinition |
hasAttribute(DefinitionName attrName)
Returns the attribute definition is this class uses the specified attribute.
|
AttributeDefinition |
hasAttribute(String name) |
boolean |
hasRules() |
boolean |
isAllowedAttribute(DefinitionName name) |
boolean |
isInstanceOfThis(ClassDefinition cd) |
boolean |
isMust(DefinitionName name) |
DmcObject |
newDMOInstance()
This function instantiates a new instance of the object type defined
by this class definition.
|
DmwWrapper |
newInstance()
This function instantiates a new instance of the object type defined
by this class definition.
|
addActions, addAllowedParents, addDerivedClasses, addDescription, addDmwWrapperType, addExcludeFromContext, addIntendedToExtend, addMay, addMust, addUsesWrapperInterface, getAbbrev, getActions, getActionsSize, getAllowedParents, getAllowedParentsSize, getClassType, getCreateIndex, getDataType, getDerivedClasses, getDerivedClassesSize, getDerivedFrom, getDescription, getDescriptionSize, getDescriptionWithNewlines, getDmdID, getDmeClass, getDmeImport, getDMO, getDmoAuxClass, getDmoAuxClassImport, getDmoClass, getDmoImport, getDmtClass, getDmtImport, getDmtREFImport, getDmwAuxClass, getDmwAuxClassImport, getDmwClass, getDmwImport, getDmwIteratorClass, getDmwIteratorImport, getDmwWrapperType, getDmwWrapperTypeSize, getDsdModuleDefinition, getExcludeFromContext, getExcludeFromContextSize, getIntendedToExtend, getIntendedToExtendSize, getInternallyGenerated, getInternalTypeRef, getIsDSDefinition, getIsNamedBy, getJavaClass, getMay, getMaySize, getMust, getMustSize, getName, getObjectName, getObjectNameAttribute, getObsoleteVersion, getPartOfDefinitionModule, getRuleDefinition, getSubpackage, getSupportsBackrefTracking, getUsesInterface, getUsesWrapperInterface, getUsesWrapperInterfaceSize, getUseWrapperType, setAbbrev, setClassType, setCreateIndex, setDataType, setDerivedFrom, setDmcObject, setDmdID, setDmeClass, setDmeImport, setDmoAuxClass, setDmoAuxClassImport, setDmoClass, setDmoImport, setDmtClass, setDmtImport, setDmtREFImport, setDmwAuxClass, setDmwAuxClassImport, setDmwClass, setDmwImport, setDmwIteratorClass, setDmwIteratorImport, setDsdModuleDefinition, setInternallyGenerated, setInternalTypeRef, setIsDSDefinition, setIsNamedBy, setJavaClass, setName, setObsoleteVersion, setPartOfDefinitionModule, setRuleDefinition, setSubpackage, setSupportsBackrefTracking, setUsesInterface, setUseWrapperTypegetDmcObjectaddRelatedToConcept, getRelatedToConcept, getRelatedToConceptSizeequals, getFullDotName, getNameOfModuleWhereThisCameFromaddComment, addExample, addNvp, addOptimize, addQuestion, addSkip, addTags, getComment, getCommentSize, getDefinedIn, getDmoFromModule, getDotName, getExample, getExampleSize, getFile, getHint, getLineNumber, getNvp, getNvpSize, getObsolete, getOptimize, getOptimizeSize, getQuestion, getQuestionSize, getRelationship, getSearchable, getSkip, getSkipSize, getSortName, getTags, getTagsSize, getVersion, getWhy, setDefinedIn, setDmoFromModule, setDotName, setFile, setHint, setLineNumber, setObsolete, setRelationship, setSearchable, setSortName, setVersion, setWhyaddAux, applyModifier, equals, getBackRefs, getConstructionClass, getConstructionClassInfo, getConstructionClassName, getObjectClass, getReferringObjects, getReferringObjectsViaAttribute, hasAux, isReferenced, referenceCount, removeAux, resolveReferences, resolveReferences, serializeIt, toJSON, toOIF, toOIF, toPersistentOIF, toString, youAreDeletedgetDeleted, getModifier, setDeleted, setModifierclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDefinedIn, getDotName, toOIFequalspublic ClassDefinition()
public ClassDefinition(ClassDefinitionDMO obj)
public ClassDefinition(ClassDefinitionDMO obj, DmcClassInfo dci)
protected ClassDefinition(String mn) throws DmcValueException
mn - The meta name of the definition.DmcValueExceptionpublic DmcClassInfo getClassInfo()
public DmcClassInfo getDynamicClassInfo()
public boolean allowsParent(ClassDefinition parent)
parent - The parent class.public AttributeDefinition hasAttribute(String name)
public boolean isMust(DefinitionName name)
name - the name of an attribute.public boolean isAllowedAttribute(DefinitionName name)
public AttributeDefinition hasAttribute(DefinitionName attrName)
attrName - The attribute name.public TreeMap<DefinitionName,AttributeDefinition> getAllMust()
public TreeMap<DefinitionName,AttributeDefinition> getAllMay()
public TreeMap<DefinitionName,AttributeDefinition> getAllAttributesAtThisLevel()
public TreeMap<DefinitionName,AttributeDefinition> getFullAttrMap()
public ArrayList<ClassDefinition> getAllImplemented()
public TreeMap<DefinitionName,ClassDefinition> getAllDerived()
public ArrayList<ClassDefinition> getAllImplementors()
public TreeMap<DefinitionName,ClassDefinition> getAllowedSubcomps()
public DmwWrapper newInstance() throws ResultException
ResultExceptionpublic DmcObject newDMOInstance() throws ResultException
ResultExceptionpublic boolean isInstanceOfThis(ClassDefinition cd)
cd - the class against which we're testingpublic ArrayList<ClassDefinition> getBaseClasses()
public void adjustJavaClass()
DmcValueExceptionpublic String getDMWPackage()
public void adjustJavaClass(String genContext, String genSuffix)
DmcValueExceptionpublic WrapperTypeEnum getDmwWrapperType(String context)
public boolean generateWrapper(String context)
context - The contextpublic String getShortestName()
public void addImportsForAdditionalAttributes(SchemaManager sm, ImportManager imports, DmcUncheckedObject uco) throws ResultException
imports - where we'll add the required imports.uco - the rule data object.ResultExceptionpublic boolean hasRules()
public Iterator<RuleDataDMO> getClassRules()
public int derivationDepth()
public void getDerivedClassesDepthFirst(ArrayList<ClassDefinition> classes)
classes - place to return the resultsCopyright © 2023. All rights reserved.