tudresden.ocl.check.types.xmifacade
Class ModelOperation
java.lang.Object
tudresden.ocl.check.types.xmifacade.ModelOperation
- All Implemented Interfaces:
- Comparable
- public final class ModelOperation
- extends Object
- implements Comparable
Note:
Operations value identity is determined by name and parameter types only.
Return type and isquery flag are not significant for value identity.
Method equals and hashCode are implemented accordingly.
- See Also:
equals(Object)
,
hashCode()
name
private String name
params
private Type[] params
type
private Type type
isquery
private boolean isquery
parent
private ModelClass parent
hash
private int hash
- Implements hashCode to be compatible to equals, according to the
semantics of Object.hashCode().
- See Also:
equals(Object)
,
Object.hashCode()
ModelOperation
public ModelOperation(String name,
Type[] params,
Type type,
boolean isquery)
getName
public String getName()
getParams
public Type[] getParams()
getType
public Type getType()
isQuery
public boolean isQuery()
setParent
public void setParent(ModelClass parent)
getParent
public ModelClass getParent()
matchesTo
public boolean matchesTo(Type[] other)
equals
public boolean equals(Object o)
- Returns true, if both operations have the same signature.
For each class there shouldn't be two operations beeing equal.
This method cannot be used for navigate, since it does not care
about polymorphism of parameter types.
- See Also:
ModelClass.navigateParameterized(String, Type[])
hashCode
public int hashCode()
toString
public final String toString()
printData
public void printData(PrintStream o)
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.