Class PolyglotTree<T extends Tree>

  • All Implemented Interfaces:
    org.graalvm.polyglot.proxy.Proxy, org.graalvm.polyglot.proxy.ProxyObject, Tree

    public class PolyglotTree<T extends Tree>
    extends java.lang.Object
    implements Tree, org.graalvm.polyglot.proxy.ProxyObject
    • Constructor Detail

      • PolyglotTree

        public PolyglotTree​(T delegate)
    • Method Detail

      • getId

        public java.util.UUID getId()
        Description copied from interface: Tree
        An id that can be used to identify a particular AST element, even after transformations have taken place on it
        Specified by:
        getId in interface Tree
        Returns:
        A unique identifier
      • isAcceptable

        public <P> boolean isAcceptable​(TreeVisitor<?,​P> v,
                                        P p)
        Description copied from interface: Tree
        Checks the supplied argument to see if the supplied visitor and its context would be valid arguments to accept(). Typically this involves checking that the visitor is of a type that operates on this kind of tree. e.g.: A Java Tree implementation would return true for JavaVisitors and false for MavenVisitors
        Specified by:
        isAcceptable in interface Tree
        Type Parameters:
        P - the visitor's context argument
        Returns:
        'true' if the arguments to this function would be valid arguments to accept()
      • getMember

        public java.lang.Object getMember​(java.lang.String key)
        Specified by:
        getMember in interface org.graalvm.polyglot.proxy.ProxyObject
      • getMemberKeys

        public java.lang.Object getMemberKeys()
        Specified by:
        getMemberKeys in interface org.graalvm.polyglot.proxy.ProxyObject
      • hasMember

        public boolean hasMember​(java.lang.String key)
        Specified by:
        hasMember in interface org.graalvm.polyglot.proxy.ProxyObject
      • putMember

        public void putMember​(java.lang.String key,
                              org.graalvm.polyglot.Value value)
        Specified by:
        putMember in interface org.graalvm.polyglot.proxy.ProxyObject