net.ogdf.ogml.util
Class OgmlSwitch<T>

java.lang.Object
  extended by net.ogdf.ogml.util.OgmlSwitch<T>

public class OgmlSwitch<T>
extends Object

The Switch for the model's inheritance hierarchy. It supports the call doSwitch(object) to invoke the caseXXX method for each class of the model, starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is returned, which is the result of the switch.

See Also:
OgmlPackage
Rating red
Generated:
This code was automatically generated.

Field Summary
protected static OgmlPackage modelPackage
          The cached model package
 
Constructor Summary
OgmlSwitch()
          Creates an instance of the switch.
 
Method Summary
 T caseBooleanType(BooleanType object)
          Returns the result of interpreting the object as an instance of 'Boolean Type'.
 T caseBoolType(BoolType object)
          Returns the result of interpreting the object as an instance of 'Bool Type'.
 T caseComposedType(ComposedType object)
          Returns the result of interpreting the object as an instance of 'Composed Type'.
 T caseConstraintsType(ConstraintsType object)
          Returns the result of interpreting the object as an instance of 'Constraints Type'.
 T caseDataType(DataType object)
          Returns the result of interpreting the object as an instance of 'Data Type'.
 T caseDocumentRoot(DocumentRoot object)
          Returns the result of interpreting the object as an instance of 'Document Root'.
 T caseEdgeConstraintType(EdgeConstraintType object)
          Returns the result of interpreting the object as an instance of 'Edge Constraint Type'.
 T caseEdgeLayoutType(EdgeLayoutType object)
          Returns the result of interpreting the object as an instance of 'Edge Layout Type'.
 T caseEdgeStyleTemplateType(EdgeStyleTemplateType object)
          Returns the result of interpreting the object as an instance of 'Edge Style Template Type'.
 T caseEdgeType(EdgeType object)
          Returns the result of interpreting the object as an instance of 'Edge Type'.
 T caseEndpointType(EndpointType object)
          Returns the result of interpreting the object as an instance of 'Endpoint Type'.
 T caseFillType(FillType object)
          Returns the result of interpreting the object as an instance of 'Fill Type'.
 T caseFontType(FontType object)
          Returns the result of interpreting the object as an instance of 'Font Type'.
 T caseGraphStyleType(GraphStyleType object)
          Returns the result of interpreting the object as an instance of 'Graph Style Type'.
 T caseGraphType(GraphType object)
          Returns the result of interpreting the object as an instance of 'Graph Type'.
 T caseIntType(IntType object)
          Returns the result of interpreting the object as an instance of 'Int Type'.
 T caseKeysType(KeysType object)
          Returns the result of interpreting the object as an instance of 'Keys Type'.
 T caseKeyType(KeyType object)
          Returns the result of interpreting the object as an instance of 'Key Type'.
 T caseKeyValueType(KeyValueType object)
          Returns the result of interpreting the object as an instance of 'Key Value Type'.
 T caseLabelConstraintType(LabelConstraintType object)
          Returns the result of interpreting the object as an instance of 'Label Constraint Type'.
 T caseLabelLayoutType(LabelLayoutType object)
          Returns the result of interpreting the object as an instance of 'Label Layout Type'.
 T caseLabelStyleTemplateType(LabelStyleTemplateType object)
          Returns the result of interpreting the object as an instance of 'Label Style Template Type'.
 T caseLabelType(LabelType object)
          Returns the result of interpreting the object as an instance of 'Label Type'.
 T caseLayoutType(LayoutType object)
          Returns the result of interpreting the object as an instance of 'Layout Type'.
 T caseLineStyleType(LineStyleType object)
          Returns the result of interpreting the object as an instance of 'Line Style Type'.
 T caseLineType(LineType object)
          Returns the result of interpreting the object as an instance of 'Line Type'.
 T caseLocationType(LocationType object)
          Returns the result of interpreting the object as an instance of 'Location Type'.
 T caseNodeConstraintType(NodeConstraintType object)
          Returns the result of interpreting the object as an instance of 'Node Constraint Type'.
 T caseNodeLayoutType(NodeLayoutType object)
          Returns the result of interpreting the object as an instance of 'Node Layout Type'.
 T caseNodeStyleTemplateType(NodeStyleTemplateType object)
          Returns the result of interpreting the object as an instance of 'Node Style Template Type'.
 T caseNodeType(NodeType object)
          Returns the result of interpreting the object as an instance of 'Node Type'.
 T caseNumberType(NumberType object)
          Returns the result of interpreting the object as an instance of 'Number Type'.
 T caseOgmlType(OgmlType object)
          Returns the result of interpreting the object as an instance of 'Type'.
 T casePointType(PointType object)
          Returns the result of interpreting the object as an instance of 'Point Type'.
 T caseSegmentType(SegmentType object)
          Returns the result of interpreting the object as an instance of 'Segment Type'.
 T caseShapeType1(ShapeType1 object)
          Returns the result of interpreting the object as an instance of 'Shape Type1'.
 T caseSourceStyleType(SourceStyleType object)
          Returns the result of interpreting the object as an instance of 'Source Style Type'.
 T caseSourceTargetType(SourceTargetType object)
          Returns the result of interpreting the object as an instance of 'Source Target Type'.
 T caseStructureType(StructureType object)
          Returns the result of interpreting the object as an instance of 'Structure Type'.
 T caseStylesType(StylesType object)
          Returns the result of interpreting the object as an instance of 'Styles Type'.
 T caseStyleTemplatesType(StyleTemplatesType object)
          Returns the result of interpreting the object as an instance of 'Style Templates Type'.
 T caseTargetStyleType(TargetStyleType object)
          Returns the result of interpreting the object as an instance of 'Target Style Type'.
 T caseTemplateType(TemplateType object)
          Returns the result of interpreting the object as an instance of 'Template Type'.
 T caseTextType(TextType object)
          Returns the result of interpreting the object as an instance of 'Text Type'.
 T caseUriType(UriType object)
          Returns the result of interpreting the object as an instance of 'Uri Type'.
 T defaultCase(EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
protected  T doSwitch(EClass theEClass, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 T doSwitch(EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
protected  T doSwitch(int classifierID, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static OgmlPackage modelPackage
The cached model package

Generated:
This code was automatically generated.
Constructor Detail

OgmlSwitch

public OgmlSwitch()
Creates an instance of the switch.

Generated:
This code was automatically generated.
Method Detail

doSwitch

public T doSwitch(EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.
Generated:
This code was automatically generated.

doSwitch

protected T doSwitch(EClass theEClass,
                     EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.
Generated:
This code was automatically generated.

doSwitch

protected T doSwitch(int classifierID,
                     EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.
Generated:
This code was automatically generated.

caseBooleanType

public T caseBooleanType(BooleanType object)
Returns the result of interpreting the object as an instance of 'Boolean Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Boolean Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseBoolType

public T caseBoolType(BoolType object)
Returns the result of interpreting the object as an instance of 'Bool Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Bool Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseComposedType

public T caseComposedType(ComposedType object)
Returns the result of interpreting the object as an instance of 'Composed Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Composed Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseConstraintsType

public T caseConstraintsType(ConstraintsType object)
Returns the result of interpreting the object as an instance of 'Constraints Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Constraints Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseDataType

public T caseDataType(DataType object)
Returns the result of interpreting the object as an instance of 'Data Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Data Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseDocumentRoot

public T caseDocumentRoot(DocumentRoot object)
Returns the result of interpreting the object as an instance of 'Document Root'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Document Root'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseEdgeConstraintType

public T caseEdgeConstraintType(EdgeConstraintType object)
Returns the result of interpreting the object as an instance of 'Edge Constraint Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Edge Constraint Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseEdgeLayoutType

public T caseEdgeLayoutType(EdgeLayoutType object)
Returns the result of interpreting the object as an instance of 'Edge Layout Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Edge Layout Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseEdgeStyleTemplateType

public T caseEdgeStyleTemplateType(EdgeStyleTemplateType object)
Returns the result of interpreting the object as an instance of 'Edge Style Template Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Edge Style Template Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseEdgeType

public T caseEdgeType(EdgeType object)
Returns the result of interpreting the object as an instance of 'Edge Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Edge Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseEndpointType

public T caseEndpointType(EndpointType object)
Returns the result of interpreting the object as an instance of 'Endpoint Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Endpoint Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseFillType

public T caseFillType(FillType object)
Returns the result of interpreting the object as an instance of 'Fill Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Fill Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseFontType

public T caseFontType(FontType object)
Returns the result of interpreting the object as an instance of 'Font Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Font Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseGraphStyleType

public T caseGraphStyleType(GraphStyleType object)
Returns the result of interpreting the object as an instance of 'Graph Style Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Graph Style Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseGraphType

public T caseGraphType(GraphType object)
Returns the result of interpreting the object as an instance of 'Graph Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Graph Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseIntType

public T caseIntType(IntType object)
Returns the result of interpreting the object as an instance of 'Int Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Int Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseKeysType

public T caseKeysType(KeysType object)
Returns the result of interpreting the object as an instance of 'Keys Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Keys Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseKeyType

public T caseKeyType(KeyType object)
Returns the result of interpreting the object as an instance of 'Key Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Key Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseKeyValueType

public T caseKeyValueType(KeyValueType object)
Returns the result of interpreting the object as an instance of 'Key Value Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Key Value Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLabelConstraintType

public T caseLabelConstraintType(LabelConstraintType object)
Returns the result of interpreting the object as an instance of 'Label Constraint Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Label Constraint Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLabelLayoutType

public T caseLabelLayoutType(LabelLayoutType object)
Returns the result of interpreting the object as an instance of 'Label Layout Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Label Layout Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLabelStyleTemplateType

public T caseLabelStyleTemplateType(LabelStyleTemplateType object)
Returns the result of interpreting the object as an instance of 'Label Style Template Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Label Style Template Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLabelType

public T caseLabelType(LabelType object)
Returns the result of interpreting the object as an instance of 'Label Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Label Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLayoutType

public T caseLayoutType(LayoutType object)
Returns the result of interpreting the object as an instance of 'Layout Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Layout Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLineStyleType

public T caseLineStyleType(LineStyleType object)
Returns the result of interpreting the object as an instance of 'Line Style Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Line Style Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLineType

public T caseLineType(LineType object)
Returns the result of interpreting the object as an instance of 'Line Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Line Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseLocationType

public T caseLocationType(LocationType object)
Returns the result of interpreting the object as an instance of 'Location Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Location Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseNodeConstraintType

public T caseNodeConstraintType(NodeConstraintType object)
Returns the result of interpreting the object as an instance of 'Node Constraint Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Node Constraint Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseNodeLayoutType

public T caseNodeLayoutType(NodeLayoutType object)
Returns the result of interpreting the object as an instance of 'Node Layout Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Node Layout Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseNodeStyleTemplateType

public T caseNodeStyleTemplateType(NodeStyleTemplateType object)
Returns the result of interpreting the object as an instance of 'Node Style Template Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Node Style Template Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseNodeType

public T caseNodeType(NodeType object)
Returns the result of interpreting the object as an instance of 'Node Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Node Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseNumberType

public T caseNumberType(NumberType object)
Returns the result of interpreting the object as an instance of 'Number Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Number Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseOgmlType

public T caseOgmlType(OgmlType object)
Returns the result of interpreting the object as an instance of 'Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

casePointType

public T casePointType(PointType object)
Returns the result of interpreting the object as an instance of 'Point Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Point Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseSegmentType

public T caseSegmentType(SegmentType object)
Returns the result of interpreting the object as an instance of 'Segment Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Segment Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseShapeType1

public T caseShapeType1(ShapeType1 object)
Returns the result of interpreting the object as an instance of 'Shape Type1'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Shape Type1'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseSourceStyleType

public T caseSourceStyleType(SourceStyleType object)
Returns the result of interpreting the object as an instance of 'Source Style Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Source Style Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseSourceTargetType

public T caseSourceTargetType(SourceTargetType object)
Returns the result of interpreting the object as an instance of 'Source Target Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Source Target Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseStructureType

public T caseStructureType(StructureType object)
Returns the result of interpreting the object as an instance of 'Structure Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Structure Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseStylesType

public T caseStylesType(StylesType object)
Returns the result of interpreting the object as an instance of 'Styles Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Styles Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseStyleTemplatesType

public T caseStyleTemplatesType(StyleTemplatesType object)
Returns the result of interpreting the object as an instance of 'Style Templates Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Style Templates Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseTargetStyleType

public T caseTargetStyleType(TargetStyleType object)
Returns the result of interpreting the object as an instance of 'Target Style Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Target Style Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseTemplateType

public T caseTemplateType(TemplateType object)
Returns the result of interpreting the object as an instance of 'Template Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Template Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseTextType

public T caseTextType(TextType object)
Returns the result of interpreting the object as an instance of 'Text Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Text Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

caseUriType

public T caseUriType(UriType object)
Returns the result of interpreting the object as an instance of 'Uri Type'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Uri Type'.
See Also:
doSwitch(EObject)
Generated:
This code was automatically generated.

defaultCase

public T defaultCase(EObject object)
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
doSwitch(org.eclipse.emf.ecore.EObject)
Generated:
This code was automatically generated.