Dresden OCL Toolkit

tudresden.ocl.injection.reverseeng
Class MapDescriptor

java.lang.Object
  extended bytudresden.ocl.injection.reverseeng.AbstractDescriptor
      extended bytudresden.ocl.injection.reverseeng.MapDescriptor

public class MapDescriptor
extends AbstractDescriptor

Descriptor for a class attribute of map type.

These descriptors are maintained by AnalysisConsumer in its m_lcdMaps member.

Version:
0.1
Author:
sz9 (Steffen Zschaler)

Nested Class Summary
 
Nested classes inherited from class tudresden.ocl.injection.reverseeng.AbstractDescriptor
AbstractDescriptor.AbstractDescriptorEvent, AbstractDescriptor.AbstractDescriptorListener, AbstractDescriptor.TracedTypeProposal
 
Field Summary
 
Fields inherited from class tudresden.ocl.injection.reverseeng.AbstractDescriptor
s_sAllTypesReasonString, s_sMinimalTypeReasonString
 
Constructor Summary
MapDescriptor(AnalysisConsumer acOwner, JavaClass jcParent, String sName, String sType, String sComment, int nCommentID)
          Creates new MapDescriptor
 
Method Summary
 RevengTreeNode createTreeNode(DefaultTreeModel dtmModel)
          Create tree node to render this descriptor.
 boolean isCollection()
          True, if feature described is a collection and not a map.
 boolean isIncomplete()
          True if the descriptor is incomplete, i.e.
 void setKeyType(String sKeyType)
          Set the contents of the key-type tag for the described feature.
 String toString()
           
 
Methods inherited from class tudresden.ocl.injection.reverseeng.AbstractDescriptor
addModifiedListener, adjustDocComment, fireModified, getCommentID, getContainingClass, getDisplayName, getDocComment, getElementType, getJavaDocName, getKeyType, getName, getProposedElementTypes, getProposedKeyTypes, getType, indentComment, removeModifiedListener, setAssociatedTreeNode, setElementType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapDescriptor

public MapDescriptor(AnalysisConsumer acOwner,
                     JavaClass jcParent,
                     String sName,
                     String sType,
                     String sComment,
                     int nCommentID)
Creates new MapDescriptor

Method Detail

setKeyType

public void setKeyType(String sKeyType)
Description copied from class: AbstractDescriptor
Set the contents of the key-type tag for the described feature.

Fires AbstractDescriptor.AbstractDescriptorListener.onDescriptorModified(tudresden.ocl.injection.reverseeng.AbstractDescriptor.AbstractDescriptorEvent) event.

Overrides:
setKeyType in class AbstractDescriptor
Parameters:
sKeyType - The new contents of the key-type tag. null to delete the key-type tag.

toString

public String toString()

isIncomplete

public boolean isIncomplete()
Description copied from class: AbstractDescriptor
True if the descriptor is incomplete, i.e. if a necessary tag (element-type/key-type) is not filled in.

Overrides:
isIncomplete in class AbstractDescriptor
Returns:
True if the descriptor is incomplete, i.e. if a necessary tag (element-type/key-type) is not filled in.

isCollection

public boolean isCollection()
Description copied from class: AbstractDescriptor
True, if feature described is a collection and not a map.

Specified by:
isCollection in class AbstractDescriptor
Returns:
true, if feature described is a collection and not a map

createTreeNode

public RevengTreeNode createTreeNode(DefaultTreeModel dtmModel)
Description copied from class: AbstractDescriptor
Create tree node to render this descriptor.

Specified by:
createTreeNode in class AbstractDescriptor
Parameters:
dtmModel - Tree model which the tree node should become part of.
Returns:
the freshly created node

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.