BlockRegistry, MaskRegistry, PatternRegistry -> *Factory

'Registry' will need to be used for the block, entity, item,
and so on registries.
This commit is contained in:
sk89q
2014-07-08 17:39:33 -07:00
parent 65f451279c
commit 7463fdef79
13 changed files with 64 additions and 64 deletions

View File

@@ -178,7 +178,7 @@ public class WorldEditBinding extends BindingHelper {
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getBlockRegistry().parseFromInput(context.next(), parserContext);
return worldEdit.getBlockFactory().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}
@@ -207,7 +207,7 @@ public class WorldEditBinding extends BindingHelper {
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getPatternRegistry().parseFromInput(context.next(), parserContext);
return worldEdit.getPatternFactory().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}
@@ -236,7 +236,7 @@ public class WorldEditBinding extends BindingHelper {
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getMaskRegistry().parseFromInput(context.next(), parserContext);
return worldEdit.getMaskFactory().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}

View File

@@ -30,22 +30,22 @@ import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An abstract implementation of a registry for internal usage.
* An abstract implementation of a factory for internal usage.
*
* @param <E> the element that the registry returns
* @param <E> the element that the factory returns
*/
@SuppressWarnings("ProtectedField")
public abstract class AbstractRegistry<E> {
public abstract class AbstractFactory<E> {
protected final WorldEdit worldEdit;
protected final List<InputParser<E>> parsers = new ArrayList<InputParser<E>>();
/**
* Create a new registry.
* Create a new factory.
*
* @param worldEdit the WorldEdit instance
*/
protected AbstractRegistry(WorldEdit worldEdit) {
protected AbstractFactory(WorldEdit worldEdit) {
checkNotNull(worldEdit);
this.worldEdit = worldEdit;
}

View File

@@ -24,7 +24,7 @@ import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.input.InputParseException;
/**
* Input parser interface for {@link AbstractRegistry}.
* Input parser interface for {@link AbstractFactory}.
*
* @param <E> the element
*/