E - the specific type of expression translator to be usedpublic abstract class ModelTranslator<E extends ExpressionTranslator> extends MessageReceiver
ExpressionTranslator.| Modifier and Type | Field and Description |
|---|---|
private E |
expressionTranslator |
| Constructor and Description |
|---|
ModelTranslator(E expressionTranslator)
Creates a new model translator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collect(IMessage message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives an EASy message.
|
static <T> java.util.List<T> |
copy(java.util.List<T> objects)
Copies a set of
objects. |
void |
error(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic)
Adds a diagnostic error, typically from a standalone parser
configuration.
|
void |
error(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives an error message.
|
int |
getErrorCount()
Returns the number of errors.
|
protected E |
getExpressionTranslator()
Returns the associated expression translator.
|
Message |
getMessage(int index)
Returns the specified message.
|
int |
getMessageCount()
Returns the number of messages.
|
static <T extends org.eclipse.emf.ecore.EObject> |
select(java.util.List<? extends org.eclipse.emf.ecore.EObject> objects,
java.lang.Class<T> type)
Selects the given
objects by type. |
void |
warning(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives a warning message.
|
errorprivate E extends ExpressionTranslator expressionTranslator
public ModelTranslator(E expressionTranslator)
expressionTranslator - the associated expression translatorpublic static <T extends org.eclipse.emf.ecore.EObject> java.util.List<T> select(java.util.List<? extends org.eclipse.emf.ecore.EObject> objects,
java.lang.Class<T> type)
objects by type.T - the actual type of list entriesobjects - the objects to be consideredtype - the type as selection criteriontypepublic static <T> java.util.List<T> copy(java.util.List<T> objects)
objects.T - the actual type of list entriesobjects - the objects to be copied (may be null)object is null)protected E getExpressionTranslator()
public int getMessageCount()
MessageReceivergetMessageCount in class MessageReceiverpublic int getErrorCount()
MessageReceivergetErrorCount in class MessageReceiverpublic Message getMessage(int index)
MessageReceivergetMessage in class MessageReceiverindex - the position of the message to be returnedpublic void error(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the errorpublic void warning(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the warningpublic void collect(IMessage message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature, int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the errorpublic void error(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic)
error in class MessageReceiverdiagnostic - the diagnostic to be addedCopyright © 2009 - 2018 SSE. All Rights Reserved.