- All Implemented Interfaces:
Resolver,ValueResolver,WithPriority
- Enclosing class:
ValueResolvers
-
Field Summary
Fields inherited from interface io.quarkus.qute.WithPriority
DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(EvalContext context) Returns the set of method signatures supported by this value resolver for code completion in the Qute debugger.Returns the set of property names supported by this value resolver for code completion in the Qute debugger.resolve(EvalContext context) This method should return an instance ofif it's not possible to resolve the context.invalid reference
Results#NotFoundMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.qute.ValueResolver
getCachedResolver, getPriority
-
Constructor Details
-
ArrayResolver
public ArrayResolver()
-
-
Method Details
-
appliesTo
- Parameters:
context-- Returns:
trueif this resolver applies to the given context
-
resolve
Description copied from interface:ResolverThis method should return an instance ofif it's not possible to resolve the context. Any other value is considered a valid result, includinginvalid reference
Results#NotFoundnull.- Parameters:
context-- Returns:
- the result
-
getSupportedProperties
Description copied from interface:ValueResolverReturns the set of property names supported by this value resolver for code completion in the Qute debugger.These properties are suggested when evaluating expressions on a base object. For example, if the user invokes completion at
myList.|, the evaluation context will be initialized withmyListas the base object, andappliesTowill be called with that context. Only if it returnstruewill the properties from this set be proposed.Completion examples:
"length"→ inserts as-is:myList.length|"size"→ inserts as-is:myList.size|
Example:
@Override public Set<String> getSupportedProperties() { return Set.of("length", "size"); }- Specified by:
getSupportedPropertiesin interfaceValueResolver- Returns:
- a set of supported property names to be shown in the debugger's code completion
-
getSupportedMethods
Description copied from interface:ValueResolverReturns the set of method signatures supported by this value resolver for code completion in the Qute debugger.These methods are suggested when evaluating expressions on a base object. For example, if the user invokes completion at
myList.|, the evaluation context will be initialized withmyListas the base object, andappliesTowill be called with that context. Only if it returnstruewill the methods from this set be proposed.Completion examples:
"take(index)"→ inserts as-is:myList.take(index)|"takeLast(${index})"→ inserts with the parameter selected:myList.takeLast(|[index])
The
${param}syntax indicates that the debugger selects the parameter so the user can type it immediately.Example:
@Override public Set<String> getSupportedMethods() { return Set.of("take(index)", "takeLast(${index})"); }- Specified by:
getSupportedMethodsin interfaceValueResolver- Returns:
- a set of supported method signatures to be shown in the debugger's code completion
-