org.eclipse.emf.ecore.xcore.interpreter
Class XcoreConversionDelegate

java.lang.Object
  extended by org.eclipse.emf.ecore.xcore.interpreter.XcoreConversionDelegate
All Implemented Interfaces:
EDataType.Internal.ConversionDelegate

public class XcoreConversionDelegate
extends java.lang.Object
implements EDataType.Internal.ConversionDelegate


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate
EDataType.Internal.ConversionDelegate.Factory
 
Constructor Summary
XcoreConversionDelegate()
           
 
Method Summary
 java.lang.String convertToString(java.lang.Object value)
          Converts a value of the data type to a string literal.
 java.lang.Object createFromString(java.lang.String literal)
          Creates a value of the data type from a string literal.
 void initialize(org.eclipse.xtext.xbase.XBlockExpression createBody, org.eclipse.xtext.xbase.XBlockExpression convertBody, EDataType eDataType, XcoreInterpreter interpreter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XcoreConversionDelegate

public XcoreConversionDelegate()
Method Detail

initialize

public void initialize(org.eclipse.xtext.xbase.XBlockExpression createBody,
                       org.eclipse.xtext.xbase.XBlockExpression convertBody,
                       EDataType eDataType,
                       XcoreInterpreter interpreter)

convertToString

public java.lang.String convertToString(java.lang.Object value)
Description copied from interface: EDataType.Internal.ConversionDelegate
Converts a value of the data type to a string literal.

Specified by:
convertToString in interface EDataType.Internal.ConversionDelegate
Parameters:
value - the value to be converted.
Returns:
the literal representation of the value.

createFromString

public java.lang.Object createFromString(java.lang.String literal)
Description copied from interface: EDataType.Internal.ConversionDelegate
Creates a value of the data type from a string literal.

Specified by:
createFromString in interface EDataType.Internal.ConversionDelegate
Parameters:
literal - the string literal to be converted.
Returns:
the value of the literal representation.

Copyright 2001-2012 IBM Corporation and others.
All Rights Reserved.