java.lang.Object
ch.tocco.nice2.conditionals.api.tree.Node
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConditionNode, FactorNode, IntegrationNode, LogicalNode

public abstract class Node extends Object implements Serializable
See Also:
  • Method Details Link icon

    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • toString Link icon

      protected void toString(Node.ToString toString)
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • appendHash Link icon

      protected static int appendHash(int hash, Object of)
    • appendHash Link icon

      protected static int appendHash(int hash, boolean of)
    • copy Link icon

      public abstract Node copy()
    • copyTo Link icon

      protected void copyTo(Node toNode)
    • getKind Link icon

      public Node.Kind getKind()
    • allChildren Link icon

      public Iterable<Node> allChildren()
    • get Link icon

      @Nullable public <T> T get(Class<T> type)
    • get Link icon

      @Nullable public <T> T get(Class<T> type, @Nullable @Nullable Object key)
    • require Link icon

      public <T> T require(Class<T> type)
    • require Link icon

      public <T> T require(Class<T> type, @Nullable @Nullable Object key)
    • annotate Link icon

      public <T> T annotate(T value)
    • annotate Link icon

      @Nullable public <T> T annotate(@Nullable @Nullable Class<T> type, @Nullable T value)
    • annotate Link icon

      @Nullable public <T> T annotate(@Nullable @Nullable Class<T> type, @Nullable T value, boolean equalityRelevant)
    • annotate Link icon

      @Nullable public <T> T annotate(@Nullable @Nullable Class<T> type, @Nullable @Nullable Object key, @Nullable T value)
    • annotate Link icon

      @Nullable public <T> T annotate(@Nullable @Nullable Class<T> type, @Nullable @Nullable Object key, @Nullable T value, boolean equalityRelevant)
    • getAnnotations Link icon

      public Map<Node.AnnotationKey,Object> getAnnotations()
    • setFlag Link icon

      public void setFlag(Enum<?> flag, boolean value)
    • isFlagged Link icon

      public boolean isFlagged(Enum<?> flag)
    • getSource Link icon

      public String getSource()
    • setSource Link icon

      public void setSource(String source)
    • getStartLocation Link icon

      public Location getStartLocation()
    • setStartLocation Link icon

      public void setStartLocation(Location startLocation)
    • getEndLocation Link icon

      public Location getEndLocation()
    • setEndLocation Link icon

      public void setEndLocation(Location endLocation)
    • updateLocations Link icon

      public void updateLocations()
    • markErroneous Link icon

      public void markErroneous()
    • isErroneous Link icon

      public boolean isErroneous()
    • containsErroneous Link icon

      public boolean containsErroneous()
    • process Link icon

      public Node process(NodeVisitor visitor)
    • visitThis Link icon

      protected void visitThis(ch.tocco.nice2.conditionals.api.tree.CursorImpl cursor, NodeVisitor visitor)
    • dump Link icon

      public void dump(Appendable out) throws IOException
      Throws:
      IOException
    • dump Link icon

      public void dump(Appendable out, int depth) throws IOException
      Throws:
      IOException
    • setDeserializationTypeManager Link icon

      public static void setDeserializationTypeManager(TypeManager deserializationTypeManager)
      This is a thread local used during deserialization of nodes containing a type.
      Parameters:
      deserializationTypeManager - The type manager to use while deserializing nodes.
    • writeType Link icon

      protected static void writeType(ObjectOutputStream output, Type<?> type) throws IOException
      Throws:
      IOException
    • readType Link icon

      protected static Type<?> readType(ObjectInputStream input) throws ClassNotFoundException, IOException
      Throws:
      ClassNotFoundException
      IOException
    • and Link icon

      public static AndNode and()
    • or Link icon

      public static OrNode or()
    • not Link icon

      public static NotNode not()
    • not Link icon

      public static NotNode not(Node child)
    • identifier Link icon

      public static IdentifierNode identifier()
    • identifier Link icon

      public static IdentifierNode identifier(String name)
    • identifier Link icon

      public static IdentifierNode identifier(String name, boolean quoted)
    • identifier Link icon

      public static IdentifierNode identifier(Enum keyword)
    • path Link icon

      public static PathNode path()
    • path Link icon

      public static PathNode path(IdentifierNode firstElement)
    • parameter Link icon

      public static ParameterNode parameter()
    • parameter Link icon

      public static ParameterNode parameter(String name)
    • parameter Link icon

      public static ParameterNode parameter(String name, Type<?> type)
    • funcall Link icon

      public static FuncallNode funcall()
    • funcall Link icon

      public static FuncallNode funcall(PathNode path)
    • funcall Link icon

      public static FuncallNode funcall(PathNode path, Type<?> type)
    • funcall Link icon

      public static FuncallNode funcall(IdentifierNode identifier)
    • funcall Link icon

      public static FuncallNode funcall(Enum keyword)
    • funcall Link icon

      public static FuncallNode funcall(IdentifierNode identifier, Type<?> type)
    • funcall Link icon

      public static FuncallNode funcall(Enum keyword, Type<?> type)
    • literal Link icon

      public static LiteralNode literal(Type<?> type, Object value)
    • literal Link icon

      public static LiteralNode literal(Type<?> type, Object value, boolean inlineLiteral)
    • nullLiteral Link icon

      public static LiteralNode nullLiteral(Type<Void> type)
    • equation Link icon

      public static EquationNode equation()
    • equation Link icon

      public static EquationNode equation(EquationNode.Operator op)
    • equation Link icon

      public static EquationNode equation(FactorNode left, EquationNode.Operator op, FactorNode right)
    • isTrue Link icon

      public static IsTrueNode isTrue()
    • isTrue Link icon

      public static IsTrueNode isTrue(FactorNode factor)
    • isAnd Link icon

      public static boolean isAnd(Node node)
    • isOr Link icon

      public static boolean isOr(Node node)
    • isNot Link icon

      public static boolean isNot(Node node)
    • isIsTrue Link icon

      public static boolean isIsTrue(Node node)
    • isEquation Link icon

      public static boolean isEquation(Node node)
    • isLiteral Link icon

      public static boolean isLiteral(Node node)
    • isIdentifier Link icon

      public static boolean isIdentifier(Node node)
    • isFuncall Link icon

      public static boolean isFuncall(Node node)