Package com.github.veithen.alta.template
Class PropertyGroup<C,GC>
java.lang.Object
com.github.veithen.alta.template.PropertyGroup<C,GC>
- Type Parameters:
C- the type of context in which the template is evaluatedGC- the group context type
Defines a group of properties. Properties in a group are evaluated in a context that is specific
to the group and that is derived from the context object (that defines the context in which the
template is evaluated). This group context is created only once even if the group is used
multiple times in the template (see
prepare(Object)). It can therefore be used for
costly computations the results of which are used by all properties in the group.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddProperty(String name, Property<GC> property) getProperty(String name) abstract GCCreate the group context for this property group and the given context object.
-
Constructor Details
-
PropertyGroup
-
-
Method Details
-
getGroupContextClass
-
addProperty
-
getProperty
-
prepare
Create the group context for this property group and the given context object. The group context is later passed toProperty.evaluate(Object)when the property is evaluated. During the evaluation of a template, this method is called exactly once for every property group used in that template.- Parameters:
object- the context object- Returns:
- the group context or
nullif the property group is not supported for the given artifact - Throws:
EvaluationException
-