org.apache.jdo.impl.jdoql.tree
Class TypeImpl

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by org.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
              extended by org.apache.jdo.impl.jdoql.tree.NodeImpl
                  extended by org.apache.jdo.impl.jdoql.tree.TypeImpl
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable, java.lang.Cloneable, Node, Type

public final class TypeImpl
extends NodeImpl
implements Type

This node represents a type instance. A type instance wraps a java.lang.Class instance which has been supplied by the application. The following nodes have type instances as children:

  • CandidateClass
  • CastExpr
  • Decl
  • StaticFieldAccessExpr The result type of a type instance is the wrapped java.lang.Class instance. Type instances are not visible in query tree factory methods and expression factory methods. They are internally created by in implementation and are walked by a node visitor.

    Author:
    Michael Watzek
    See Also:
    Serialized Form

    Field Summary
     
    Fields inherited from class org.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
    column, line, typeInfo
     
    Fields inherited from class antlr.BaseAST
    down, right
     
    Constructor Summary
    TypeImpl()
              The noarg constructor is needed for ANTLR support and deserialization.
    TypeImpl(antlr.Token token)
              The noarg constructor is needed for ANTLR support.
     
    Method Summary
     void arrive(NodeVisitor visitor)
              Delegates to the argument visitor.
     java.lang.String getTypeName()
              Returns the string representation of the Java class, which is wrapped by this instance.
     java.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
              Delegates to the argument visitor.
     
    Methods inherited from class org.apache.jdo.impl.jdoql.tree.NodeImpl
    clone, getChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, toString, walkNextChild
     
    Methods inherited from class org.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
    getColumn, getLine, getTypeInfo, initialize, initialize, initialize, setColumn, setLine, setTypeInfo, treeToString
     
    Methods inherited from class antlr.CommonAST
    getText, getType, initialize, setText, setType
     
    Methods inherited from class antlr.BaseAST
    addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
     
    Methods inherited from class java.lang.Object
    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface org.apache.jdo.jdoql.tree.Node
    getChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, walkNextChild
     

    Constructor Detail

    TypeImpl

    public TypeImpl()
    The noarg constructor is needed for ANTLR support and deserialization. The caller must make sure to set the ANTLR tree structure himself or, call setChildren optionally.


    TypeImpl

    public TypeImpl(antlr.Token token)
    The noarg constructor is needed for ANTLR support. The caller must make sure to set the ANTLR tree structure himself or, call setChildren optionally.

    Method Detail

    getTypeName

    public java.lang.String getTypeName()
    Returns the string representation of the Java class, which is wrapped by this instance.

    Specified by:
    getTypeName in interface Type
    Returns:
    the Java type name

    arrive

    public void arrive(NodeVisitor visitor)
    Delegates to the argument visitor.

    Specified by:
    arrive in interface Node
    Overrides:
    arrive in class NodeImpl
    Parameters:
    visitor - the node visitor

    leave

    public java.lang.Object leave(NodeVisitor visitor,
                                  java.lang.Object[] results)
    Delegates to the argument visitor.

    Specified by:
    leave in interface Node
    Overrides:
    leave in class NodeImpl
    Parameters:
    visitor - the node visitor
    results - the result array
    Returns:
    the object returned by the visitor instance


    Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.