/** * Obtains the {@code TransformerContext} from the given tag. * * @param tag the current tag (for obtaining context information) * @return the {@code TransformerContext} */ private static TransformerContext fetchTransformerContext(Tag tag) { return ComponentBuilderData.get(tag.getContext()) .getTransformerContext(); } }
/** * Creates the bean provider for the specified value using the given default * class description. If a class of the value is specified using the * properties of this instance, this class will be used. Otherwise the * passed in class description (if defined) will be used. * * @param defClass the default class description * @return the bean provider managing the constant value specified for this * tag * @throws JellyTagException if the target class for a conversion is * ambiguous * @throws IllegalArgumentException if type conversion fails */ public ConstantBeanProvider createValueProvider(ClassDescription defClass) throws JellyTagException { Class<?> valCls; if (getValueClassData().isDefined()) { valCls = resolveClassDescData(getOwner().getContext(), getValueClassData()); } else { valCls = resolveClassDescription(getOwner().getContext(), defClass); } return ConstantBeanProvider.getInstance(valCls, getValue()); }