net.sourceforge.nrl.parser.model.uml2
Class UML2DataType

java.lang.Object
  extended by net.sourceforge.nrl.parser.model.AbstractModelElement
      extended by net.sourceforge.nrl.parser.model.AbstractClassifier
          extended by net.sourceforge.nrl.parser.model.uml2.UML2DataType
All Implemented Interfaces:
IClassifier, IDataType, IModelElement

public class UML2DataType
extends AbstractClassifier
implements IDataType

A data type that wraps a UML2 DataType object.

Author:
Christian Nentwich

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sourceforge.nrl.parser.model.IModelElement
IModelElement.ElementType
 
Field Summary
 
Fields inherited from class net.sourceforge.nrl.parser.model.AbstractClassifier
nameToAttribute
 
Fields inherited from interface net.sourceforge.nrl.parser.model.IModelElement
OBJECT
 
Constructor Summary
UML2DataType(org.eclipse.uml2.uml.DataType dataType, IPackage container)
           
 
Method Summary
 List<String> getDocumentation()
          Produces the documentation from the enclosed comments on the UML data type.
 IModelElement.ElementType getElementType()
          Return an enum indicating what type of element this is, to reduce the need to sub-cast prematurely.
 org.eclipse.uml2.uml.DataType getUML2()
           
 org.eclipse.uml2.uml.Classifier getUmlSuperClassifier()
           
 Object getUserData(String key)
          Return user data stored on this model element.
 boolean isBuiltIn()
          Return true if this is a built-in NRL type
protected  void resolve(Map<org.eclipse.uml2.uml.Classifier,IClassifier> umlClassToModelElement, List<String> warnings)
          Resolve the types of all attributes stored on this class.
 void setUMLSuperClass(org.eclipse.uml2.uml.Classifier umlSuperClass)
          Set the superclass of this one in the UML model
 
Methods inherited from class net.sourceforge.nrl.parser.model.AbstractClassifier
addAttribute, getAttributeByName, getAttributes, getAttributes, hasAttribute, hasNonStaticAttributes, hasStaticAttributes, isEnumeration, rebuildAttributeNameMap, removeAttribute, removeAttributeNameMapping, setEnumeration
 
Methods inherited from class net.sourceforge.nrl.parser.model.AbstractModelElement
addChild, getContainingPackage, getDescendants, getName, getOriginalName, getParent, getQualifiedName, isAssignableFrom, isSupplementary, setName, setOriginalName, setParent, setSupplementary, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.nrl.parser.model.IClassifier
getAttributeByName, getAttributes, hasAttribute, hasStaticAttributes, isEnumeration
 
Methods inherited from interface net.sourceforge.nrl.parser.model.IModelElement
getContainingPackage, getDescendants, getName, getOriginalName, getParent, getQualifiedName, isAssignableFrom, isSupplementary, setUserData
 

Constructor Detail

UML2DataType

public UML2DataType(org.eclipse.uml2.uml.DataType dataType,
                    IPackage container)
Method Detail

getDocumentation

public List<String> getDocumentation()
Produces the documentation from the enclosed comments on the UML data type.

Specified by:
getDocumentation in interface IModelElement
Returns:
the documentation as a list of strings, or an empty list

getElementType

public IModelElement.ElementType getElementType()
Description copied from interface: IModelElement
Return an enum indicating what type of element this is, to reduce the need to sub-cast prematurely.

Specified by:
getElementType in interface IModelElement
Returns:
the element type

getUML2

public org.eclipse.uml2.uml.DataType getUML2()

getUmlSuperClassifier

public org.eclipse.uml2.uml.Classifier getUmlSuperClassifier()

getUserData

public Object getUserData(String key)
Description copied from interface: IModelElement
Return user data stored on this model element. This can be used to attach and retrieve processing information.

Specified by:
getUserData in interface IModelElement
Overrides:
getUserData in class AbstractModelElement
Parameters:
key - the key under which the data is stored
Returns:
the data or null if not present

isBuiltIn

public boolean isBuiltIn()
Description copied from interface: IDataType
Return true if this is a built-in NRL type

Specified by:
isBuiltIn in interface IDataType
Returns:
true if built-in

setUMLSuperClass

public void setUMLSuperClass(org.eclipse.uml2.uml.Classifier umlSuperClass)
Set the superclass of this one in the UML model

Parameters:
umlSuperClass - the super class

resolve

protected void resolve(Map<org.eclipse.uml2.uml.Classifier,IClassifier> umlClassToModelElement,
                       List<String> warnings)
Resolve the types of all attributes stored on this class.

Parameters:
a - mapping from uml classes to model element instances
warnings - the list to append warnings to


Copyright © 2006-2013. All Rights Reserved.