org.eclipse.ocl.examples.domain.ids.impl
Class AbstractTemplateableIdImpl<T extends TemplateableId>

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.ids.impl.AbstractElementId
      extended by org.eclipse.ocl.examples.domain.ids.impl.AbstractTemplateableIdImpl<T>
All Implemented Interfaces:
ElementId, TemplateableId
Direct Known Subclasses:
AbstractGeneralizedIdImpl, AbstractSpecializedIdImpl

public abstract class AbstractTemplateableIdImpl<T extends TemplateableId>
extends AbstractElementId
implements TemplateableId


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.domain.ids.impl.AbstractElementId
AbstractElementId.OperationIdsMap, AbstractElementId.PropertyIdsMap
 
Field Summary
protected  java.lang.Integer hashCode
           
protected  int templateParameters
           
 
Fields inherited from interface org.eclipse.ocl.examples.domain.ids.TemplateableId
NULL_TEMPLATEABLE_ID_ARRAY
 
Constructor Summary
protected AbstractTemplateableIdImpl(java.lang.Integer hashCode, int templateParameters)
           
 
Method Summary
protected abstract  T createSpecializedId(BindingsId templateBindings)
           
 EnumerationLiteralId getEnumerationLiteralId(java.lang.String name)
           
 OperationId getOperationId(int templateParameters, java.lang.String name, ParametersId parametersId)
           
 PropertyId getPropertyId(java.lang.String name)
           
 T getSpecializedId(BindingsId templateBindings)
          Return the typeId for this typeId specialized by typeParameters.
 T getSpecializedId(ElementId... templateBindings)
           
 TemplateParameterId getTemplateParameterId(int index)
           
 int getTemplateParameters()
           
 int hashCode()
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.ids.impl.AbstractElementId
equals, getLiteralName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.ids.TemplateableId
getGeneralizedId, getLiteralName, getMetaTypeName, getName
 
Methods inherited from interface org.eclipse.ocl.examples.domain.ids.ElementId
accept, getDisplayName
 

Field Detail

hashCode

@NonNull
protected final java.lang.Integer hashCode

templateParameters

protected final int templateParameters
Constructor Detail

AbstractTemplateableIdImpl

protected AbstractTemplateableIdImpl(@NonNull
                                     java.lang.Integer hashCode,
                                     int templateParameters)
Method Detail

createSpecializedId

@NonNull
protected abstract T createSpecializedId(@NonNull
                                                 BindingsId templateBindings)

getEnumerationLiteralId

@NonNull
public EnumerationLiteralId getEnumerationLiteralId(@NonNull
                                                            java.lang.String name)

getOperationId

@NonNull
public OperationId getOperationId(int templateParameters,
                                          @NonNull
                                          java.lang.String name,
                                          @NonNull
                                          ParametersId parametersId)

getPropertyId

@NonNull
public PropertyId getPropertyId(@NonNull
                                        java.lang.String name)

getSpecializedId

@NonNull
public T getSpecializedId(@NonNull
                                  BindingsId templateBindings)
Description copied from interface: TemplateableId
Return the typeId for this typeId specialized by typeParameters.

Throws UnsupportedException for typeIds such as Primitive Types that may not be specialized.

Specified by:
getSpecializedId in interface TemplateableId

getSpecializedId

@NonNull
public T getSpecializedId(@NonNull
                                  ElementId... templateBindings)

getTemplateParameterId

@NonNull
public TemplateParameterId getTemplateParameterId(int index)

getTemplateParameters

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

hashCode

public final int hashCode()
Specified by:
hashCode in class AbstractElementId