org.eclipse.xtext.impl.XtextFactoryImpl Maven / Gradle / Ivy
/**
*
*
*
* $Id: XtextFactoryImpl.java,v 1.19 2010/04/06 14:09:54 sefftinge Exp $
*/
package org.eclipse.xtext.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.xtext.*;
/**
*
* An implementation of the model Factory.
*
* @generated
*/
public class XtextFactoryImpl extends EFactoryImpl implements XtextFactory {
/**
* Creates the default factory implementation.
*
*
* @generated
*/
public static XtextFactory init() {
try {
XtextFactory theXtextFactory = (XtextFactory)EPackage.Registry.INSTANCE.getEFactory(XtextPackage.eNS_URI);
if (theXtextFactory != null) {
return theXtextFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new XtextFactoryImpl();
}
/**
* Creates an instance of the factory.
*
*
* @generated
*/
public XtextFactoryImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case XtextPackage.GRAMMAR: return createGrammar();
case XtextPackage.ABSTRACT_RULE: return createAbstractRule();
case XtextPackage.ABSTRACT_METAMODEL_DECLARATION: return createAbstractMetamodelDeclaration();
case XtextPackage.GENERATED_METAMODEL: return createGeneratedMetamodel();
case XtextPackage.REFERENCED_METAMODEL: return createReferencedMetamodel();
case XtextPackage.PARSER_RULE: return createParserRule();
case XtextPackage.TYPE_REF: return createTypeRef();
case XtextPackage.ABSTRACT_ELEMENT: return createAbstractElement();
case XtextPackage.ACTION: return createAction();
case XtextPackage.KEYWORD: return createKeyword();
case XtextPackage.RULE_CALL: return createRuleCall();
case XtextPackage.ASSIGNMENT: return createAssignment();
case XtextPackage.CROSS_REFERENCE: return createCrossReference();
case XtextPackage.TERMINAL_RULE: return createTerminalRule();
case XtextPackage.ABSTRACT_NEGATED_TOKEN: return createAbstractNegatedToken();
case XtextPackage.NEGATED_TOKEN: return createNegatedToken();
case XtextPackage.UNTIL_TOKEN: return createUntilToken();
case XtextPackage.WILDCARD: return createWildcard();
case XtextPackage.ENUM_RULE: return createEnumRule();
case XtextPackage.ENUM_LITERAL_DECLARATION: return createEnumLiteralDeclaration();
case XtextPackage.ALTERNATIVES: return createAlternatives();
case XtextPackage.UNORDERED_GROUP: return createUnorderedGroup();
case XtextPackage.GROUP: return createGroup();
case XtextPackage.CHARACTER_RANGE: return createCharacterRange();
case XtextPackage.COMPOUND_ELEMENT: return createCompoundElement();
case XtextPackage.EOF: return createEOF();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
public Grammar createGrammar() {
GrammarImpl grammar = new GrammarImpl();
return grammar;
}
/**
*
*
* @generated
*/
public AbstractRule createAbstractRule() {
AbstractRuleImpl abstractRule = new AbstractRuleImpl();
return abstractRule;
}
/**
*
*
* @generated
*/
public AbstractMetamodelDeclaration createAbstractMetamodelDeclaration() {
AbstractMetamodelDeclarationImpl abstractMetamodelDeclaration = new AbstractMetamodelDeclarationImpl();
return abstractMetamodelDeclaration;
}
/**
*
*
* @generated
*/
public GeneratedMetamodel createGeneratedMetamodel() {
GeneratedMetamodelImpl generatedMetamodel = new GeneratedMetamodelImpl();
return generatedMetamodel;
}
/**
*
*
* @generated
*/
public ReferencedMetamodel createReferencedMetamodel() {
ReferencedMetamodelImpl referencedMetamodel = new ReferencedMetamodelImpl();
return referencedMetamodel;
}
/**
*
*
* @generated
*/
public ParserRule createParserRule() {
ParserRuleImpl parserRule = new ParserRuleImpl();
return parserRule;
}
/**
*
*
* @generated
*/
public TypeRef createTypeRef() {
TypeRefImpl typeRef = new TypeRefImpl();
return typeRef;
}
/**
*
*
* @generated
*/
public AbstractElement createAbstractElement() {
AbstractElementImpl abstractElement = new AbstractElementImpl();
return abstractElement;
}
/**
*
*
* @generated
*/
public Action createAction() {
ActionImpl action = new ActionImpl();
return action;
}
/**
*
*
* @generated
*/
public Keyword createKeyword() {
KeywordImpl keyword = new KeywordImpl();
return keyword;
}
/**
*
*
* @generated
*/
public RuleCall createRuleCall() {
RuleCallImpl ruleCall = new RuleCallImpl();
return ruleCall;
}
/**
*
*
* @generated
*/
public Assignment createAssignment() {
AssignmentImpl assignment = new AssignmentImpl();
return assignment;
}
/**
*
*
* @generated
*/
public CrossReference createCrossReference() {
CrossReferenceImpl crossReference = new CrossReferenceImpl();
return crossReference;
}
/**
*
*
* @generated
*/
public TerminalRule createTerminalRule() {
TerminalRuleImpl terminalRule = new TerminalRuleImpl();
return terminalRule;
}
/**
*
*
* @generated
*/
public AbstractNegatedToken createAbstractNegatedToken() {
AbstractNegatedTokenImpl abstractNegatedToken = new AbstractNegatedTokenImpl();
return abstractNegatedToken;
}
/**
*
*
* @generated
*/
public NegatedToken createNegatedToken() {
NegatedTokenImpl negatedToken = new NegatedTokenImpl();
return negatedToken;
}
/**
*
*
* @generated
*/
public UntilToken createUntilToken() {
UntilTokenImpl untilToken = new UntilTokenImpl();
return untilToken;
}
/**
*
*
* @generated
*/
public Wildcard createWildcard() {
WildcardImpl wildcard = new WildcardImpl();
return wildcard;
}
/**
*
* @since 2.0
*
* @generated
*/
public EOF createEOF() {
EOFImpl eof = new EOFImpl();
return eof;
}
/**
*
*
* @generated
*/
public EnumRule createEnumRule() {
EnumRuleImpl enumRule = new EnumRuleImpl();
return enumRule;
}
/**
*
*
* @generated
*/
public EnumLiteralDeclaration createEnumLiteralDeclaration() {
EnumLiteralDeclarationImpl enumLiteralDeclaration = new EnumLiteralDeclarationImpl();
return enumLiteralDeclaration;
}
/**
*
*
* @generated
*/
public Alternatives createAlternatives() {
AlternativesImpl alternatives = new AlternativesImpl();
return alternatives;
}
/**
*
*
* @generated
*/
public UnorderedGroup createUnorderedGroup() {
UnorderedGroupImpl unorderedGroup = new UnorderedGroupImpl();
return unorderedGroup;
}
/**
*
*
* @generated
*/
public Group createGroup() {
GroupImpl group = new GroupImpl();
return group;
}
/**
*
*
* @generated
*/
public CharacterRange createCharacterRange() {
CharacterRangeImpl characterRange = new CharacterRangeImpl();
return characterRange;
}
/**
*
*
* @generated
*/
public CompoundElement createCompoundElement() {
CompoundElementImpl compoundElement = new CompoundElementImpl();
return compoundElement;
}
/**
*
*
* @generated
*/
public XtextPackage getXtextPackage() {
return (XtextPackage)getEPackage();
}
/**
*
*
* @deprecated the package should not be accessed statically.
* @generated
*/
@Deprecated
public static XtextPackage getPackage() {
return XtextPackage.eINSTANCE;
}
} //XtextFactoryImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy