at.jku.risc.stout.nau.data
public class NodeFactory extends Object
Modifier and Type | Class and Description |
---|---|
class |
NodeFactory.FactoryInstantiationException |
Modifier and Type | Field and Description |
---|---|
Class<? extends Atom> |
classAtom
Class to use for atom instantiation.
|
Class<? extends FunctionSymbol> |
classFncSymb
Class to use for function-symbol instantiation.
|
Class<? extends SortAtom> |
classSortAtom
Class to use for instantiating a sort of atom.
|
Class<? extends SortData> |
classSortData
Class to use for instantiating a sort of data.
|
Class<? extends Variable> |
classVariable
Class to use for variable instantiation.
|
Constructor and Description |
---|
NodeFactory() |
NodeFactory(String prefixFreshAtom,
String prefixFreshVar) |
Modifier and Type | Method and Description |
---|---|
<T> Collection<T> |
getAllByType(Class<T> type) |
<T> T |
getExists(Class<T> type,
Object... args) |
<T> T |
getExists(Class<T> type,
String name) |
String |
getPrefixFreshAtom() |
String |
getPrefixFreshVar() |
String |
getSuffixFreshAtom() |
String |
getSuffixFreshVar() |
Atom |
newAtom(String name)
Instantiates an untyped atom.
|
Atom |
newAtom(String name,
SortAtom sort)
Instantiates an atom of the specified sort.
|
Atom |
newAtom(String name,
String sort)
Instantiates an atom of the specified sort.
|
FunctionSymbol |
newFunction(String name)
Instantiates an untyped function symbol.
|
FunctionSymbol |
newFunction(String name,
Sort[] sortArgs,
SortData sortRet)
Instantiates a function symbol of the specified arity.
|
FunctionSymbol |
newFunction(String name,
Sort[] sortArgs,
String sortRet)
Instantiates a function symbol of the specified arity.
|
<T extends Sort> |
newSort(Class<T> sortType,
String name)
Returns a sort of atom by name.
|
Variable |
newVarAtom(String name,
String sort)
Instantiates a variable of the specified sort.
|
Variable |
newVarData(String name,
String sort)
Instantiates a variable of the specified sort.
|
Variable |
newVariable(String name)
Instantiates an untyped variable.
|
Variable |
newVariable(String name,
Sort sort)
Instantiates a variable of the specified sort.
|
Atom |
obtainFreshAtom(SortAtom sort) |
Variable |
obtainFreshVar(Sort sort) |
String |
obtainUniqueAtomName() |
String |
obtainUniqueVarName() |
void |
resetCounter() |
void |
setPrefixFreshAtom(String prefixFreshAtom) |
void |
setPrefixFreshVar(String prefixFreshVar) |
void |
setSuffixFreshAtom(String suffixFreshAtom) |
void |
setSuffixFreshVar(String suffixFreshVar) |
<T> T |
uniqueInstance(Class<T> type,
Object... args)
Returns a unique instance of the specified class for some given
constructor arguments.
|
public Class<? extends Atom> classAtom
public Class<? extends FunctionSymbol> classFncSymb
public Class<? extends SortAtom> classSortAtom
public Class<? extends SortData> classSortData
public <T> Collection<T> getAllByType(Class<T> type)
public String getPrefixFreshAtom()
public String getPrefixFreshVar()
public String getSuffixFreshAtom()
public String getSuffixFreshVar()
public Atom newAtom(String name) throws NodeFactory.FactoryInstantiationException
public Atom newAtom(String name, SortAtom sort) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public Atom newAtom(String name, String sort) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public FunctionSymbol newFunction(String name) throws NodeFactory.FactoryInstantiationException
public FunctionSymbol newFunction(String name, Sort[] sortArgs, SortData sortRet) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public FunctionSymbol newFunction(String name, Sort[] sortArgs, String sortRet) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public <T extends Sort> T newSort(Class<T> sortType, String name) throws NodeFactory.FactoryInstantiationException
public Variable newVarAtom(String name, String sort) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public Variable newVarData(String name, String sort) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public Variable newVariable(String name) throws NodeFactory.FactoryInstantiationException
public Variable newVariable(String name, Sort sort) throws NodeFactory.FactoryInstantiationException, MalformedSortException
public String obtainUniqueAtomName()
public String obtainUniqueVarName()
public void resetCounter()
public void setPrefixFreshAtom(String prefixFreshAtom)
public void setPrefixFreshVar(String prefixFreshVar)
public void setSuffixFreshAtom(String suffixFreshAtom)
public void setSuffixFreshVar(String suffixFreshVar)
public <T> T uniqueInstance(Class<T> type, Object... args) throws NodeFactory.FactoryInstantiationException
NodeFactory.FactoryInstantiationException
- If no corresponding constructor exists.