Package-level declarations

Types

Link copied to clipboard
abstract class AbstractTermVisitor<T> : TermVisitor<T>

A TermVisitor for the handful of Term sub-types that inherit from more than one immediate supertype in the hierarchy (namely Atom, which is both a it.unibo.tuprolog.core.Struct and a it.unibo.tuprolog.core.Constant, and it.unibo.tuprolog.core.EmptyList/it.unibo.tuprolog.core.EmptyBlock, each both a collection type and it.unibo.tuprolog.core.Empty). TermVisitor's default dispatch can only delegate to one supertype's visitX method; join is where subclasses decide how to combine the results of visiting as each of the (here, two) relevant supertypes. DefaultTermVisitor and ExhaustiveTermVisitor provide the two most common policies (first result wins, last result wins).

Link copied to clipboard

An AbstractTermVisitor resolving multiple-supertype terms (see AbstractTermVisitor) by using the first applicable supertype's visit result, e.g. treating an it.unibo.tuprolog.core.Atom primarily as a it.unibo.tuprolog.core.Struct.

Link copied to clipboard

An AbstractTermVisitor resolving multiple-supertype terms (see AbstractTermVisitor) by using the last applicable supertype's visit result, e.g. treating an it.unibo.tuprolog.core.Atom primarily as a it.unibo.tuprolog.core.Constant.