|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used by the type checker to handle type representations.
Classes implementing this interface will have their navigate methods return
the type representation of the type of the association end with the name
name or the type of the property name. In both cases the
result can either be a application-defined type or a predefined type (basic
type like Integer or collection type). Take care to return
Sequences for navigation over ordered associations. If the type has
no association end or property with the given name, a
OclTypeException
is thrown.
Classes implementing this interface should also overwrite equals
,
toString
and
hashCode
appropriately. The toString
method should
return the type name as it would be expected in an OCL expression (e.g.
"Person" and not things like "application defined type:
Person").
Note: This interface has been augmented by a new version
Type2
. Implementing Type2
is strongly recommended,
though not mandatory.
Basic
,
Collection
,
OclTypeException
Method Summary | |
boolean |
conformsTo(Type t)
|
boolean |
equals(Object o)
|
int |
hashCode()
It will be nessary to redefine the hashCode if equality of types is not equality of representation objects. |
boolean |
hasState(String name)
|
Type |
navigateParameterized(String name,
Type[] params)
Navigate to the result type of the operation name. |
Type |
navigateQualified(String name,
Type[] qualifiers)
navigate to the association end or attribute name, possibly with qualifier types; unnamed association ends must by made available by implementing methods with the name of the association end's type, but beginning with a lower case character (see OCL specification for more details) |
String |
toString()
|
Method Detail |
public Type navigateQualified(String name, Type[] qualifiers) throws OclTypeException
qualifiers
- the qualifier types; may (and will in most cases) be
null
, but never an array with length 0
OclTypeException
public Type navigateParameterized(String name, Type[] params) throws OclTypeException
Implement Type2
to check for query operations.
params
- the actual argument types
OclTypeException
public boolean hasState(String name)
public boolean conformsTo(Type t)
public boolean equals(Object o)
public int hashCode()
Object.hashCode()
public String toString()
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |