Dresden OCL Toolkit

tudresden.ocl.lib
Interface NameAdapter

All Known Implementing Classes:
PrefixNameAdapter, SimpleNameAdapter

public interface NameAdapter

A case tools code generator may convert names, especially of unnamed association ends. For example, the unnamed association end connecting to a class "Person" is refered to as "person" in OCL, but may be represented as "myPerson", "thePerson" or "p0001" in the generated source code. This interface can be implemented according to the rules of a specific code generator. This interface is used for attribute and association end names only, not for class or operation names.

Author:
Frank Finger
See Also:
Ocl.setNameAdapter(NameAdapter nc)

Method Summary
 String[] getNames(String n)
          This operation takes a name as found in an OCL expression ("person" in the example above) and returns an array of possible representation names, propably including the OCL name itself, sorted for priority.
 String[] getPossibleAssociationNames(String n)
          This method is used to reconvert implementation names into possible names of the corresponding association ends.
 

Method Detail

getNames

public String[] getNames(String n)
This operation takes a name as found in an OCL expression ("person" in the example above) and returns an array of possible representation names, propably including the OCL name itself, sorted for priority.


getPossibleAssociationNames

public String[] getPossibleAssociationNames(String n)
This method is used to reconvert implementation names into possible names of the corresponding association ends.


Dresden OCL Toolkit

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