Package gw.internal.gosu.parser
Class GosuParserFactoryImpl
- java.lang.Object
-
- gw.config.BaseService
-
- gw.internal.gosu.parser.GosuParserFactoryImpl
-
- All Implemented Interfaces:
IService
,IGosuParserFactory
,IPluginHost
public class GosuParserFactoryImpl extends BaseService implements IGosuParserFactory
Defines a factory for constructing concrete IGosuParser implementations.
-
-
Constructor Summary
Constructors Constructor Description GosuParserFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IGosuClassParser
createClassParser(IGosuParser parser)
IGosuFragmentParser
createFragmentParser()
IGosuParser
createParser(ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint)
Creates an IGosuParser appropriate for parsing and executing Gosu.IGosuParser
createParser(String strSource)
IGosuParser
createParser(String strSource, ISymbolTable symTable)
Creates an IGosuParser appropriate for parsing and executing Gosu.IGosuParser
createParser(String strSource, ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint)
Creates an IGosuParser appropriate for parsing and executing Gosu.IGosuParser
createParser(String strSource, ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint, ITypeUsesMap tuMap)
Creates an IGosuParser appropriate for parsing and executing Gosu.IGosuProgramParser
createProgramParser()
<T> T
getInterface(Class<T> apiInterface)
Provides an implementation of a specified interface.
-
-
-
Method Detail
-
createParser
public IGosuParser createParser(String strSource, ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint)
Creates an IGosuParser appropriate for parsing and executing Gosu.- Specified by:
createParser
in interfaceIGosuParserFactory
- Parameters:
strSource
- The text of the the rule sourcesymTable
- The symbol table the parser uses to parse and execute the rulescriptabilityConstraint
- Specifies the types of methods/properties that are visible- Returns:
- A parser appropriate for parsing Gosu source.
-
createParser
public IGosuParser createParser(String strSource, ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint, ITypeUsesMap tuMap)
Creates an IGosuParser appropriate for parsing and executing Gosu.- Specified by:
createParser
in interfaceIGosuParserFactory
- Parameters:
strSource
- The text of the the rule sourcesymTable
- The symbol table the parser uses to parse and execute the rulescriptabilityConstraint
- Specifies the types of methods/properties that are visible- Returns:
- A parser appropriate for parsing Gosu source.
-
createParser
public IGosuParser createParser(ISymbolTable symTable, IScriptabilityModifier scriptabilityConstraint)
Creates an IGosuParser appropriate for parsing and executing Gosu.- Specified by:
createParser
in interfaceIGosuParserFactory
- Parameters:
symTable
- The symbol table the parser uses to parse and execute script.- Returns:
- A parser appropriate for parsing Gosu source.
-
createParser
public IGosuParser createParser(String strSource, ISymbolTable symTable)
Creates an IGosuParser appropriate for parsing and executing Gosu.- Specified by:
createParser
in interfaceIGosuParserFactory
- Parameters:
strSource
- The text of the the rule sourcesymTable
- The symbol table the parser uses to parse and execute the rule- Returns:
- A parser appropriate for parsing Gosu source.
-
createParser
public IGosuParser createParser(String strSource)
- Specified by:
createParser
in interfaceIGosuParserFactory
-
createClassParser
public IGosuClassParser createClassParser(IGosuParser parser)
- Specified by:
createClassParser
in interfaceIGosuParserFactory
-
createProgramParser
public IGosuProgramParser createProgramParser()
- Specified by:
createProgramParser
in interfaceIGosuParserFactory
-
createFragmentParser
public IGosuFragmentParser createFragmentParser()
- Specified by:
createFragmentParser
in interfaceIGosuParserFactory
-
getInterface
public <T> T getInterface(Class<T> apiInterface)
Description copied from interface:IPluginHost
Provides an implementation of a specified interface.- Specified by:
getInterface
in interfaceIPluginHost
- Returns:
- The implementation of the interface or null if unsupported.
-
-