VarResolvers and VarResolverSessions
The main class for performing variable resolution is VarResolver.
Two methods are provided for resolving variables:
Var resolvers can rely on the existence of other objects. For example, ConfigVar relies on the existence of a Config. This is accomplished through the following method:
Beans are accessible through the following method:
Var resolvers can be cloned and extended by using the VarResolver.copy() method. Cloning a resolver will copy it's Var class names and context objects.
Example
// Create a resolver that copies the default resolver and adds $C and $A vars.
VarResolver myVarResolver = VarResolver
.DEFAULT
.copy()
.vars(ConfigVar.class, ArgsVar.class)
.build();