DEF - public class DmcDefinitionSet<DEF extends DSDefinition> extends Object
| Constructor and Description |
|---|
DmcDefinitionSet()
Constructs a new global definition set.
|
DmcDefinitionSet(String sn)
Constructs a new global definition set.
|
DmcDefinitionSet(String cn,
DmcDefinitionSet<DSDefinition> gs)
Constructs a new definition set.
|
DmcDefinitionSet(String cn,
DmcDefinitionSet<DSDefinition> gs,
DmcDefinitionSet<?> derivedFrom)
Constructs a new definition set.
|
DmcDefinitionSet(String sn,
String cn)
Constructs a new global definition set.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(DEF def)
Adds the specified definition.
|
static void |
debug(boolean f) |
void |
delete(DEF def)
Deletes the specified definition from all maps.
|
void |
delete(DotName dn)
Deletes the specified object from this definition set.
|
protected void |
deleteFromBase(DSDefinition dsd)
When we delete up the chain of derivation, we have a small hack to get around the
fact that our derivedFromSet is not typed, so go through this intermediate function
to cast the derived definition to the correct type.
|
String |
getAllDotNames() |
DEF |
getDefinition(DotName name) |
DEF |
getDefinition(String name)
Attempts to return a definition based on its name.
|
DEF |
getDefinitionByNameAndType(DotName dn)
Attempts to return a definition based on the defname.type form of its name.
|
int |
getDefinitionCountByName(String name)
Using just the name of the definition (without the module), let's you know how many
definitions of that name exist.
|
Iterator<DEF> |
getDefinitionsByName(String name)
Gets the definitions with the specified name.
|
Collection<DmwNamedObjectWrapper> |
getIndex()
This method is used to support GetRequest retrieval when a definition manager is used
as a caching mechanism.
|
int |
getLongestName() |
int |
size() |
String |
summary() |
Collection<DEF> |
values() |
public DmcDefinitionSet()
public DmcDefinitionSet(String sn)
sn - the set name - so that we can see the name of this set when debuggingpublic DmcDefinitionSet(String sn, String cn)
sn - the set name - so that we can see the name of this set when debuggingcn - the class namepublic DmcDefinitionSet(String cn, DmcDefinitionSet<DSDefinition> gs)
cn - the name of the class of definition being stored in this definition setgs - the global definition setpublic DmcDefinitionSet(String cn, DmcDefinitionSet<DSDefinition> gs, DmcDefinitionSet<?> derivedFrom)
cn - the name of the class of definition being stored in this definition setgs - the global definition setderivedFrom - definition set for class from which we're derivedpublic static void debug(boolean f)
public void add(DEF def)
def - the definition to be added.public void delete(DotName dn) throws ResultException
dn - the fully qualified name of a definition.ResultException - if the object deosn't exist or is of the wrong class.protected void deleteFromBase(DSDefinition dsd) throws ResultException
dsd - the definition to be deletedResultExceptionpublic void delete(DEF def) throws ResultException
def - the definition to be deleted.ResultExceptionpublic int size()
public int getLongestName()
public DEF getDefinition(DotName name)
name - the name of the object you're looking forpublic Collection<DEF> values()
public Collection<DmwNamedObjectWrapper> getIndex()
public DEF getDefinition(String name) throws DmcNameClashException, DmcValueException
name - the name of the definition you're looking forDmcNameClashException - if there's more than one definition with the specified name, we throw an exceptionDmcValueExceptionpublic Iterator<DEF> getDefinitionsByName(String name) throws DmcValueException
name - the name of the definition.DmcValueExceptionpublic int getDefinitionCountByName(String name) throws DmcValueException
name - the definition nameDmcValueExceptionpublic DEF getDefinitionByNameAndType(DotName dn) throws DmcNameClashException
dn - the defname.type form of a definition nameDmcNameClashException - DmcNameClashException if there's more than one definition with the specified
name, we throw an exceptionDmcValueExceptionpublic String getAllDotNames()
public String summary()
Copyright © 2023. All rights reserved.