Class RecordELResolver
Record.
 
 The resolver handles base objects of type Record. It accepts any non-null object as a property and
 coerces it to a String using Object.toString(). The property string is used to find an accessor method for a
 field with the same name.
 
 This resolver is always read-only since Records are always read-only.
 
 ELResolvers are combined using CompositeELResolvers to define rich semantics for evaluating
 an expression. See the javadocs for ELResolver for details.
- Since:
- EL 6.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionClass<?> getCommonPropertyType(ELContext context, Object base) If the base object is an instance ofRecord, returns the most general type this resolver accepts for thepropertyargument.Class<?> booleanisReadOnly(ELContext context, Object base, Object property) If the base object is an instance ofRecord, always returnstrue.voidMethods inherited from class jakarta.el.ELResolverconvertToType, invoke
- 
Constructor Details- 
RecordELResolverpublic RecordELResolver()
 
- 
- 
Method Details- 
getValueIf the base object is an instance ofRecord, returns the value of the given field of thisRecord.If the base object is an instance of Record, thepropertyResolvedproperty of the providedELContextmust be set totrueby this resolver before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- getValuein class- ELResolver
- Parameters:
- context- The context of this evaluation.
- base- The- Recordon which to get the property.
- property- The property to get. Will be coerced to a String.
- Returns:
- If the propertyResolvedproperty of the providedELContextwas set totruethen the value of the given property. Otherwise, undefined.
- Throws:
- NullPointerException- if the provided- ELContextis- null.
- PropertyNotFoundException- if the- baseis an instance of- Recordand the specified property does not exist.
- ELException- if an exception was throws while performing the property resolution. The thrown exception must be included as the cause of this exception, if available.
 
- 
getTypeIf the base object is an instance ofRecord, always returnsnullsinceRecords are always read-only.If the base object is an instance of Record, thepropertyResolvedproperty of the providedELContextmust be set totrueby this resolver before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- getTypein class- ELResolver
- Parameters:
- context- The context of this evaluation.
- base- The- Recordto analyze.
- property- The name of the property to analyze. Will be coerced to a String.
- Returns:
- Always null
- Throws:
- NullPointerException- if the provided- ELContextis- null.
- PropertyNotFoundException- if the- baseis an instance of- Recordand the specified property does not exist.
 
- 
setValueIf the base object is an instance ofRecord, always throws an exception sinceRecords are read-only.If the base object is an instance of Record, thepropertyResolvedproperty of the providedELContextmust be set totrueby this resolver before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- setValuein class- ELResolver
- Parameters:
- context- The context of this evaluation.
- base- The- Recordon which to set the property.
- property- The name of the property to set. Will be coerced to a String.
- value- The value to set the property to
- Throws:
- NullPointerException- if the provided- ELContextis- null.
- PropertyNotFoundException- if the- baseis an instance of- Recordand the specified property does not exist.
- PropertyNotWritableException- if the- baseis an instance of- Recordand the specified property exists.
 
- 
isReadOnlyIf the base object is an instance ofRecord, always returnstrue.If the base object is an instance of Record, thepropertyResolvedproperty of the providedELContextmust be set totrueby this resolver before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- isReadOnlyin class- ELResolver
- Parameters:
- context- The context of this evaluation.
- base- The- Recordto analyze.
- property- The name of the property to analyze. Will be coerced to a String.
- Returns:
- trueif the identified property is read only, otherwise- false
- Throws:
- NullPointerException- if the provided- ELContextis- null.
- PropertyNotFoundException- if the- baseis an instance of- Recordand the specified property does not exist.
 
- 
getCommonPropertyTypeIf the base object is an instance ofRecord, returns the most general type this resolver accepts for thepropertyargument. Otherwise, returnsnull.If the base object is an instance of Recordthis method will always returnObjectsince any object is accepted for the property argument and coerced to a String.- Specified by:
- getCommonPropertyTypein class- ELResolver
- Parameters:
- context- The context of this evaluation.
- base- The- Recordto analyze.
- Returns:
- Objectis base is an instance of- Record, otherwise- null.
 
 
-