net.sf.gridarta.model.io
public class TestArchetypeParser extends AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
ArchetypeParser
for regression tests.START_ARCH_NAME
Constructor and Description |
---|
TestArchetypeParser(TestArchetypeBuilder archetypeBuilder,
AnimationObjects animationObjects,
ArchetypeSet<TestGameObject,TestMapArchObject,TestArchetype> archetypeSet)
Creates an ArchetypeParser.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
addToPanel(boolean isInternPath,
String editorFolder,
TestArchetype archetype)
Returns whether an archetype should be added to the archetype chooser.
|
protected void |
finishParseArchetype(TestArchetype archetype)
Called after all parts of an archetype have been processed.
|
protected void |
finishParseArchetypePart(TestArchetype firstArch,
TestArchetype archetype,
ErrorViewCollector errorViewCollector)
Called after the "end" line of a part has been read.
|
protected void |
initParseArchetype()
Called when a new archetype starts.
|
protected boolean |
isStartLine(String line)
Returns whether a give input line denotes the start of a new archetype.
|
protected boolean |
processLine(BufferedReader in,
String line,
String line2,
TestArchetypeBuilder archetypeBuilder,
ErrorViewCollector errorViewCollector,
List<TestGameObject> invObjects)
Called for each processed line.
|
parseArchetypeFromStream
public TestArchetypeParser(@NotNull TestArchetypeBuilder archetypeBuilder, @NotNull AnimationObjects animationObjects, @NotNull ArchetypeSet<TestGameObject,TestMapArchObject,TestArchetype> archetypeSet)
archetypeBuilder
- the archetype builder to useanimationObjects
- the animation objects instance to usearchetypeSet
- the archetype setprotected void initParseArchetype()
initParseArchetype
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
protected boolean isStartLine(@NotNull String line)
isStartLine
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
line
- the input lineprotected boolean processLine(@NotNull BufferedReader in, @NotNull String line, @NotNull String line2, @NotNull TestArchetypeBuilder archetypeBuilder, @NotNull ErrorViewCollector errorViewCollector, @NotNull List<TestGameObject> invObjects) throws IOException
processLine
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
in
- the reader reading the archetype definitionline
- the input lineline2
- the tripped input linearchetypeBuilder
- the archetype builder for the current archetypeerrorViewCollector
- the error view collector for reporting errorsinvObjects
- the inventory objects of the current archetypeIOException
- if an I/O error occursprotected void finishParseArchetypePart(@Nullable TestArchetype firstArch, @NotNull TestArchetype archetype, @NotNull ErrorViewCollector errorViewCollector)
finishParseArchetypePart
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
firstArch
- the head part or null
if
archetype
is the head partarchetype
- the tail parterrorViewCollector
- the error view collector for reporting errorsprotected void finishParseArchetype(@NotNull TestArchetype archetype)
finishParseArchetype
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
archetype
- the archetypeprotected boolean addToPanel(boolean isInternPath, @NotNull String editorFolder, @NotNull TestArchetype archetype)
addToPanel
in class AbstractArchetypeParser<TestGameObject,TestMapArchObject,TestArchetype,TestArchetypeBuilder>
isInternPath
- whether the archetype's path contains "/intern/"editorFolder
- the editor_folder attributearchetype
- the archetype to addFeedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.