Top Description Fields Constructors Methods
org.hibernate.validator.internal.engine.messageinterpolation

public Class InterpolationTerm

extends Object
Class Inheritance
Imports
java.util.Locale, jakarta.el.ExpressionFactory, jakarta.validation.MessageInterpolator

Helper class dealing with the interpolation of a single message parameter or expression extracted from a message descriptor.
Author
Hardy Ferentschik

Field Summary

Modifier and TypeField and Description
private static final String
EL_DESIGNATION_CHARACTER

Meta character to designate an EL expression.

private final String
expression

The actual expression (parameter or EL expression).

private final TermResolver
resolver

The resolver for the expression.

private final InterpolationTermType
type

The type of the expression.

Constructor Summary

AccessConstructor and Description
public
InterpolationTerm(String
the expression.
expression
,
Locale
the locale.
locale
,
ExpressionFactory
the expression factory to use if the expression uses EL.
expressionFactory
)

Create an interpolation term for an expression.

Method Summary

Modifier and TypeMethod and Description
public String
public static boolean
isElExpression(String expression)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

EL_DESIGNATION_CHARACTERback to summary
private static final String EL_DESIGNATION_CHARACTER

Meta character to designate an EL expression.

expressionback to summary
private final String expression

The actual expression (parameter or EL expression).

resolverback to summary
private final TermResolver resolver

The resolver for the expression.

typeback to summary
private final InterpolationTermType type

The type of the expression.

Constructor Detail

InterpolationTermback to summary
public InterpolationTerm(String expression, Locale locale, ExpressionFactory expressionFactory)

Create an interpolation term for an expression.

Parameters
expression:String

the expression.

locale:Locale

the locale.

expressionFactory:ExpressionFactory

the expression factory to use if the expression uses EL.

Method Detail

interpolateback to summary
public String interpolate(MessageInterpolator.Context context)
isElExpressionback to summary
public static boolean isElExpression(String expression)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override