public class JavaTransitiveInstancesKey extends BaseInputKeyWrapper<java.lang.String>
Fine print 1: classes with the same name are considered equivalent. Can be instantiated with class name, even if the class itself is not loaded yet; but if the class is available, passing it in the constructor is beneficial to avoid classloading troubles.
Fine print 2: primitive types (char, etc.) are transparently treated as their wrapper class (Character, etc.).
Non-enumerable type, can only be checked.
Stateless type (objects can't change their type)
Constructor and Description |
---|
JavaTransitiveInstancesKey(java.lang.Class<?> instanceClass)
Preferred constructor.
|
JavaTransitiveInstancesKey(java.lang.String className)
Call this constructor only in contexts where the class itself is not available for loading, e.g.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
forceGetInstanceClass() |
java.lang.Class<?> |
forceGetWrapperInstanceClass() |
int |
getArity()
The width of tuples in this relation.
|
java.lang.Class<?> |
getInstanceClass() |
java.lang.String |
getPrettyPrintableName()
A user-friendly name that can be shown on screen for degug purposes, included in exceptions, etc.
|
java.lang.String |
getStringID()
An internal string identifier that can be used to uniquely identify to input key (relevant for distributed applications).
|
java.lang.Class<?> |
getWrapperInstanceClass() |
boolean |
isEnumerable()
Returns true iff instance tuples of the key can be enumerated.
|
java.lang.String |
toString() |
equals, getWrappedKey, hashCode
public JavaTransitiveInstancesKey(java.lang.Class<?> instanceClass)
public JavaTransitiveInstancesKey(java.lang.String className)
public java.lang.Class<?> forceGetWrapperInstanceClass() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.Class<?> forceGetInstanceClass() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.Class<?> getWrapperInstanceClass()
public java.lang.Class<?> getInstanceClass()
public java.lang.String getPrettyPrintableName()
IInputKey
public java.lang.String getStringID()
IInputKey
public int getArity()
IInputKey
public boolean isEnumerable()
IInputKey
If false, the runtime can only test tuple membership in the extensional relation identified by the key, but not enumerate member tuples in general.
public java.lang.String toString()
toString
in class java.lang.Object