Stay organized with collections
Save and categorize content based on your preferences.
publicabstractclassQueryTreeContext<T>
The base class for specific query tree context used by the walker.
This class is used to maintain additional information gathered while
walking the tree. On this level it is used to collect return type
information.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eQueryTreeContext<T>\u003c/code\u003e is a base class for managing information during query tree traversal, primarily focused on collecting return type data.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003ejava.lang.Object\u003c/code\u003e and includes methods like \u003ccode\u003eaddChild()\u003c/code\u003e, \u003ccode\u003egetChild()\u003c/code\u003e, and \u003ccode\u003echildren()\u003c/code\u003e for managing child contexts within the tree.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003eaddReturnType()\u003c/code\u003e, \u003ccode\u003egetReturnTypes()\u003c/code\u003e, \u003ccode\u003esetReturnType()\u003c/code\u003e, and \u003ccode\u003esetReturnTypes()\u003c/code\u003e are used to work with return type information collected during the tree traversal.\u003c/p\u003e\n"],["\u003cp\u003eThe class also provides methods to inspect context properties such as \u003ccode\u003eisField()\u003c/code\u003e, \u003ccode\u003eisFunction()\u003c/code\u003e, \u003ccode\u003eisFuzzy()\u003c/code\u003e, \u003ccode\u003eisLiteral()\u003c/code\u003e, \u003ccode\u003eisPhrase()\u003c/code\u003e, \u003ccode\u003eisStrict()\u003c/code\u003e and whether a context is in disjunction, via \u003ccode\u003einDisjunction()\u003c/code\u003e and \u003ccode\u003esetInDisjunction()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt offers capabilities to manage and modify context attributes, including setting text via \u003ccode\u003esetText()\u003c/code\u003e, setting kind via \u003ccode\u003esetKind()\u003c/code\u003e, setting rewrite modes via \u003ccode\u003esetRewriteMode()\u003c/code\u003e, and the ability to determine compatibility with specified return types via \u003ccode\u003eisCompatibleWith()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class QueryTreeContext<T> (2.0.0)\n\n public abstract class QueryTreeContext\u003cT\u003e\n\nThe base class for specific query tree context used by the walker.\nThis class is used to maintain additional information gathered while\nwalking the tree. On this level it is used to collect return type\ninformation. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e QueryTreeContext\\\u003cT\\\u003e \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### QueryTreeContext()\n\n protected QueryTreeContext()\n\nMethods\n-------\n\n### addChild()\n\n public T addChild()\n\n### addReturnType(QueryTreeContext.Type type)\n\n public void addReturnType(QueryTreeContext.Type type)\n\n### children()\n\n public Iterable\u003cT\u003e children()\n\n### getChild(int index)\n\n public T getChild(int index)\n\n### getChildCount()\n\n public int getChildCount()\n\n### getCommonReturnTypes(T other)\n\n public Set\u003cQueryTreeContext.Type\u003e getCommonReturnTypes(T other)\n\n### getReturnTypes()\n\n public Set\u003cQueryTreeContext.Type\u003e getReturnTypes()\n\n### getText()\n\n public String getText()\n\n### inDisjunction()\n\n public boolean inDisjunction()\n\n### isCompatibleWith(QueryTreeContext.Type returnType)\n\n public boolean isCompatibleWith(QueryTreeContext.Type returnType)\n\n### isField()\n\n public boolean isField()\n\n### isFunction()\n\n public boolean isFunction()\n\n### isFuzzy()\n\n public boolean isFuzzy()\n\n### isLiteral()\n\n public boolean isLiteral()\n\n### isPhrase()\n\n public boolean isPhrase()\n\n### isStrict()\n\n public boolean isStrict()\n\n### newChildContext()\n\n protected abstract T newChildContext()\n\n### setInDisjunction(boolean inDisjunction)\n\n public void setInDisjunction(boolean inDisjunction)\n\n### setKind(QueryTreeContext.Kind kind)\n\n public void setKind(QueryTreeContext.Kind kind)\n\n### setReturnType(QueryTreeContext.Type type)\n\n public void setReturnType(QueryTreeContext.Type type)\n\n### setReturnTypes(Set\\\u003cQueryTreeContext.Type\\\u003e type)\n\n public void setReturnTypes(Set\u003cQueryTreeContext.Type\u003e type)\n\n### setRewriteMode(QueryTreeContext.RewriteMode mode)\n\n public void setRewriteMode(QueryTreeContext.RewriteMode mode)\n\n### setText(String text)\n\n public void setText(String text)\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]