VarResolvers and VarResolverSessions

The main class for performing variable resolution is {@link oaj.svl.VarResolver}. Two methods are provided for resolving variables:

Var resolvers can rely on the existence of other objects. For example, {@link oaj.config.vars.ConfigVar} relies on the existence of a {@link oaj.config.Config}. This is accomplished through the following:

The following two classes are identical in behavior except for which objects they can access:

Context and session objects are set through the following methods:

Both kinds of objects are accessible through the following method:

Var resolvers can be cloned and extended by using the {@link oaj.svl.VarResolver#builder()} method. Cloning a resolver will copy it's {@link oaj.svl.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 .builder() .vars(ConfigVar.class, ArgsVar.class) .build();