public class PrimitiveInfo
extends java.lang.Object
Struct
Modifier and Type | Field and Description |
---|---|
static int |
DIRECTIVE |
static int |
FUNCTOR |
static int |
PREDICATE |
Constructor and Description |
---|
PrimitiveInfo(int type,
java.lang.String key,
Library lib,
java.lang.reflect.Method m,
int arity) |
Modifier and Type | Method and Description |
---|---|
void |
evalAsDirective(Struct g)
evaluates the primitive as a directive
|
Term |
evalAsFunctor(Struct g)
evaluates the primitive as a functor
|
boolean |
evalAsPredicate(Struct g)
evaluates the primitive as a predicate
|
java.lang.String |
getKey() |
IPrimitives |
getSource() |
int |
getType() |
java.lang.String |
invalidate()
Method to invalidate primitives.
|
boolean |
isDirective() |
boolean |
isFunctor() |
boolean |
isPredicate() |
java.lang.String |
toString() |
public static final int DIRECTIVE
public static final int PREDICATE
public static final int FUNCTOR
public PrimitiveInfo(int type, java.lang.String key, Library lib, java.lang.reflect.Method m, int arity) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public java.lang.String invalidate()
public java.lang.String getKey()
public boolean isDirective()
public boolean isFunctor()
public boolean isPredicate()
public int getType()
public IPrimitives getSource()
public void evalAsDirective(Struct g) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.Exception
- if invocation directive failurepublic boolean evalAsPredicate(Struct g) throws java.lang.Throwable
java.lang.Exception
- if invocation primitive failurejava.lang.Throwable
public Term evalAsFunctor(Struct g) throws java.lang.Throwable
java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Object