public class ArtifactParser<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
| Constructor and Description |
|---|
ArtifactParser(@NotNull ArchetypeSet<G,A,R> archetypeSet,
@NotNull ErrorView errorView,
@NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.Collection<G> |
getInvObjects()
Returns all collected inventory objects.
|
void |
loadArchesFromArtifacts(@NotNull java.io.File f,
@NotNull java.lang.String panelName,
@NotNull java.lang.String folderName)
This method takes a filename or directory name as argument.
|
void |
loadArtifact(@NotNull java.io.BufferedReader in,
@NotNull ErrorViewCollector errorViewCollector,
@NotNull java.lang.String archPath,
@NotNull java.lang.String panelName,
@NotNull java.lang.String folderName)
Loads one artifact.
|
public ArtifactParser(@NotNull
@NotNull ArchetypeSet<G,A,R> archetypeSet,
@NotNull
@NotNull ErrorView errorView,
@NotNull
@NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser)
archetypeSet - the archetype set for looking up archetypeserrorView - the error view for reporting errorsarchetypeParser - the archetype parser to use@NotNull public @NotNull java.util.Collection<G> getInvObjects()
public void loadArchesFromArtifacts(@NotNull
@NotNull java.io.File f,
@NotNull
@NotNull java.lang.String panelName,
@NotNull
@NotNull java.lang.String folderName)
f - This can be a filename or a directory name Load "pseudo arches"
from file "artifacts" WARNING: Don't include multi arches in the
artifacts file This code can't handle it nor the real serverpanelName - the panel to add artifacts tofolderName - the folder to add artifacts topublic void loadArtifact(@NotNull
@NotNull java.io.BufferedReader in,
@NotNull
@NotNull ErrorViewCollector errorViewCollector,
@NotNull
@NotNull java.lang.String archPath,
@NotNull
@NotNull java.lang.String panelName,
@NotNull
@NotNull java.lang.String folderName)
throws java.io.IOException
in - the reader to read fromerrorViewCollector - the error view collector for reporting errorsarchPath - the archetype pathpanelName - the panel to add artifacts tofolderName - the folder to add artifacts tojava.io.IOException - if the artifact file cannot be read