org.eclipse.ocl.examples.domain.ids.impl
Class TemplateParameterIdImpl

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.ids.impl.TemplateParameterIdImpl
All Implemented Interfaces:
Nameable, ElementId, TemplateParameterId, TypeId

public class TemplateParameterIdImpl
extends java.lang.Object
implements TemplateParameterId


Field Summary
 
Fields inherited from interface org.eclipse.ocl.examples.domain.ids.TypeId
BAG, BAG_NAME, BOOLEAN, BOOLEAN_NAME, CLASS_NAME, COLLECTION, COLLECTION_NAME, COLLECTION_TYPE_NAME, DATA_TYPE_NAME, ENUMERATION_NAME, INTEGER, INTEGER_NAME, INTEGER_RANGE, INTEGER_RANGE_NAME, LAMBDA_TYPE_NAME, METACLASS, METACLASS_NAME, NULL_STRING_ARRAY, NULL_TUPLE_PART_ID_ARRAY, NULL_TYPE_ID_ARRAY, OCL_ANY, OCL_ANY_NAME, OCL_COMPARABLE, OCL_COMPARABLE_NAME, OCL_INVALID, OCL_INVALID_NAME, OCL_SELF, OCL_SELF_NAME, OCL_SUMMABLE, OCL_SUMMABLE_NAME, OCL_VOID, OCL_VOID_NAME, OPERATION_NAME, ORDERED_SET, ORDERED_SET_NAME, PRIMITIVE_TYPE_NAME, PROPERTY_NAME, REAL, REAL_NAME, SEQUENCE, SEQUENCE_NAME, SET, SET_NAME, STRING, STRING_NAME, T_1, T_2, T_3, TUPLE_NAME, TUPLE_TYPE_NAME, UNIQUE_COLLECTION, UNIQUE_COLLECTION_NAME, UNLIMITED_NATURAL, UNLIMITED_NATURAL_NAME
 
Constructor Summary
TemplateParameterIdImpl(IdManager idManager, int index)
           
 
Method Summary
<R> R
accept(IdVisitor<R> visitor)
           
 boolean equals(java.lang.Object that)
           
 java.lang.String getDisplayName()
          Return a simple name for diagnostics.
 int getIndex()
           
 java.lang.String getLiteralName()
           
 java.lang.String getMetaTypeName()
           
 java.lang.String getName()
           
 OperationId getOperationId(int templateParameters, java.lang.String name, ParametersId parametersId)
          Return the OperationId for an Operation of this typeId.
 PropertyId getPropertyId(java.lang.String name)
          Return the PropertyId for a Property of this typeId.
 TemplateParameterId getTemplateParameterId(int index)
          Return the typeId for the named type parameter of this typeId.
 int getTemplateParameters()
           
 int hashCode()
           
 ElementId specialize(BindingsId templateBindings)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateParameterIdImpl

public TemplateParameterIdImpl(@NonNull
                               IdManager idManager,
                               int index)
Method Detail

accept

@Nullable
public <R> R accept(@NonNull
                             IdVisitor<R> visitor)
Specified by:
accept in interface ElementId

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

getDisplayName

@NonNull
public java.lang.String getDisplayName()
Description copied from interface: ElementId
Return a simple name for diagnostics.

Specified by:
getDisplayName in interface ElementId

getIndex

public int getIndex()
Specified by:
getIndex in interface TemplateParameterId

getLiteralName

@Nullable
public java.lang.String getLiteralName()
Specified by:
getLiteralName in interface TypeId

getMetaTypeName

@NonNull
public java.lang.String getMetaTypeName()
Specified by:
getMetaTypeName in interface TypeId

getName

@NonNull
public java.lang.String getName()
Specified by:
getName in interface Nameable
Specified by:
getName in interface TemplateParameterId

getOperationId

@NonNull
public OperationId getOperationId(int templateParameters,
                                          @NonNull
                                          java.lang.String name,
                                          @NonNull
                                          ParametersId parametersId)
Description copied from interface: TypeId
Return the OperationId for an Operation of this typeId.

Throws UnsupportedException for typeIds such as Primitive Types that may not have operations.

Specified by:
getOperationId in interface TypeId

getPropertyId

@NonNull
public PropertyId getPropertyId(@NonNull
                                        java.lang.String name)
Description copied from interface: TypeId
Return the PropertyId for a Property of this typeId.

Throws UnsupportedException for typeIds such as Primitive Types that may not have properties.

Specified by:
getPropertyId in interface TypeId

getTemplateParameterId

@NonNull
public TemplateParameterId getTemplateParameterId(int index)
Description copied from interface: TypeId
Return the typeId for the named type parameter of this typeId.

Throws UnsupportedException for typeIds such as Primitive Types that may not have type parameters.

Specified by:
getTemplateParameterId in interface TypeId

getTemplateParameters

public int getTemplateParameters()
Specified by:
getTemplateParameters in interface TypeId

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

specialize

@NonNull
public ElementId specialize(@NonNull
                                    BindingsId templateBindings)
Specified by:
specialize in interface TypeId

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object