story.dbcore.misc
Interface GenericType
- All Known Implementing Classes:
- ActionTemporality, Activation, CharacterGender, COMLEXVerbTense, CommandType, ComparisonType, Conditionality, ConditionAssocType, ConditionGrammaticalType, CoreAction, CoreCondition, CoreGoal, CoreModifier, DefinerMode, DegreeCategory, ElementBrowserEvent, ElementBrowserMode, IDType, InterpretativeArcType, InterpretativeNodeType, InterpValidationErrorType, LinkDirection, LinkType, LogicOperator, ModifierGrammaticalType, ModifierScope, NodeType, NounFlavor, NounPlurality, Perspective, PredicateFlavor, PredicateMode, PredicateSelectorMode, Preposition, PropDiscreteness, PunctuationType, RepositoryType, ScheherIDType, SCHVariableType, SelectionRestrictionType, SemanticRole, StateTimeType, StoryPointType, StyleParam, SyntaxRestrictionType, TimelineType, TypeType, UsageModelType, VariableType, VerbTense, VirgilCommandType, VNThematicRoleType
public interface GenericType
An interface that outlines required functions for all Type classes,
e.g., IDType, LinkType, LinkDirection.
These classes are essentially enums; for example, there are only
two possible LinkDirections, ToNode and FromNode, and so there are
exactly two possible (static) objects of the LinkDirection class,
LinkDirection.FromNode and LinkDirection.ToNode.
Because enums are not supported in the version of Java used to
implement db-core, these classe are implemented by generating
dynamic source code as an early part of the make and then compiling
it. There are two files involved: a template
(src/dynamic/TypeFramework.java) and a Perl script that
fills in the slots for specific types
(src/dynamic/makeTypeClass.pl) as argued in the make file
build-common.xml.
There are some functions which are common to all Type classes that
are not a part of this interface, due to the fact that there is
something specific to the Type about them, or they need to be
static functions.
equals
boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
getAsGeneric
GenericType getAsGeneric(java.lang.String string)
render
java.lang.StringBuffer render()
toString
java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getAllTypesNonStatically
ImmutableHashSet getAllTypesNonStatically()
Copyright © 2011 David K. Elson. All Rights Reserved.