net.sf.gridarta.model.artifact
public class TestParser extends Object
Modifier and Type | Field and Description |
---|---|
private AnimationObjects |
animationObjects
The
AnimationObjects instance. |
private ArchetypeSet<TestGameObject,TestMapArchObject,TestArchetype> |
archetypeSet
The
ArchetypeSet instance. |
private ArtifactParser<TestGameObject,TestMapArchObject,TestArchetype> |
artifactParser
The
ArtifactParser instance. |
private ErrorViewCollector |
errorViewCollector
The
ErrorViewCollector instance. |
private FaceObjectProviders |
faceObjectProviders
The
FaceObjectProviders instance. |
Constructor and Description |
---|
TestParser()
Creates a new instance.
|
TestParser(TestErrorView errorView)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addArchetype(String archetypeName,
String... attributes)
Adds a new archetype.
|
Archetype<TestGameObject,TestMapArchObject,TestArchetype> |
getArchetype(String archetypeName)
Returns an
Archetype by name. |
int |
getArchetypeCount()
Returns the number of defined archetypes.
|
void |
parseArtifacts(String artifacts)
Parses artifacts definitions.
|
@NotNull private final FaceObjectProviders faceObjectProviders
FaceObjectProviders
instance.@NotNull private final ArchetypeSet<TestGameObject,TestMapArchObject,TestArchetype> archetypeSet
ArchetypeSet
instance.@NotNull private final AnimationObjects animationObjects
AnimationObjects
instance.@NotNull private final ErrorViewCollector errorViewCollector
ErrorViewCollector
instance.@NotNull private final ArtifactParser<TestGameObject,TestMapArchObject,TestArchetype> artifactParser
ArtifactParser
instance.public TestParser()
public TestParser(@NotNull TestErrorView errorView)
errorView
- the error view to use for parsingpublic void addArchetype(@NotNull String archetypeName, @NotNull String... attributes) throws DuplicateArchetypeException
archetypeName
- the archetype nameattributes
- the archetype's attributes; may be emptyDuplicateArchetypeException
- if the archetype name is not uniquepublic void parseArtifacts(@NotNull String artifacts) throws IOException
artifacts
- the artifacts definitionsIOException
- if parsing fails@NotNull public Archetype<TestGameObject,TestMapArchObject,TestArchetype> getArchetype(@NotNull String archetypeName) throws UndefinedArchetypeException
Archetype
by name.archetypeName
- the archetype nameUndefinedArchetypeException
- if the archetype name is undefinedpublic int getArchetypeCount()
Feedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.