- java.lang.Object
- 
- jakarta.el.ELResolver
- 
- jakarta.servlet.jsp.el.ImportELResolver
 
 
- 
 public class ImportELResolver extends jakarta.el.ELResolverDefines variable resolution behavior for Class imports and static imports.- Since:
- JSP 3.1
 
- 
- 
Constructor SummaryConstructors Constructor Description ImportELResolver()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<String>getCommonPropertyType(jakarta.el.ELContext context, Object base)Always returnsnullsince in normal usageScopedAttributeELResolverwill handle calls toELResolver.getCommonPropertyType(ELContext, Object).Class<Object>getType(jakarta.el.ELContext context, Object base, Object property)Always returnsnullsince in normal usageScopedAttributeELResolverwill handle calls toELResolver.getType(ELContext, Object, Object).ObjectgetValue(jakarta.el.ELContext context, Object base, Object property)If the base object isnull, searches the Class and static imports for an import with the given name and returns it if an import exists with the given name.booleanisReadOnly(jakarta.el.ELContext context, Object base, Object property)Always returnsfalsesince in normal usageScopedAttributeELResolverwill handle calls toELResolver.isReadOnly(ELContext, Object, Object).voidsetValue(jakarta.el.ELContext context, Object base, Object property, Object val)Always a NO-OP since in normal usageScopedAttributeELResolverwill handle calls toELResolver.setValue(ELContext, Object, Object, Object).
 
- 
- 
- 
Method Detail- 
getValuepublic Object getValue(jakarta.el.ELContext context, Object base, Object property) If the base object isnull, searches the Class and static imports for an import with the given name and returns it if an import exists with the given name.The propertyResolvedproperty of theELContextobject must be set totrueby this resolver before returning if an import is matched. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- getValuein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in an immediate return.
- property- The name of the import to resolve.
- Returns:
- If the propertyResolvedproperty ofELContextwas set totrue, then the import; otherwise undefined.
- Throws:
- NullPointerException- if context is- null
- jakarta.el.ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
 
 - 
getTypepublic Class<Object> getType(jakarta.el.ELContext context, Object base, Object property) Always returnsnullsince in normal usageScopedAttributeELResolverwill handle calls toELResolver.getType(ELContext, Object, Object).- Specified by:
- getTypein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Ignored
- property- Ignored
- Returns:
- Always null
- Throws:
- NullPointerException- if context is- null
- jakarta.el.ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
 
 - 
setValuepublic void setValue(jakarta.el.ELContext context, Object base, Object property, Object val)Always a NO-OP since in normal usageScopedAttributeELResolverwill handle calls toELResolver.setValue(ELContext, Object, Object, Object).- Specified by:
- setValuein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Ignored
- property- Ignored
- val- Ignored
- Throws:
- NullPointerException- if context is- null.
- jakarta.el.ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
 
 - 
isReadOnlypublic boolean isReadOnly(jakarta.el.ELContext context, Object base, Object property)Always returnsfalsesince in normal usageScopedAttributeELResolverwill handle calls toELResolver.isReadOnly(ELContext, Object, Object).- Specified by:
- isReadOnlyin class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Ignored
- property- Ignored
- Returns:
- Always false
- Throws:
- NullPointerException- if context is- null.
- jakarta.el.ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
 
 - 
getCommonPropertyTypepublic Class<String> getCommonPropertyType(jakarta.el.ELContext context, Object base) Always returnsnullsince in normal usageScopedAttributeELResolverwill handle calls toELResolver.getCommonPropertyType(ELContext, Object).- Specified by:
- getCommonPropertyTypein class- jakarta.el.ELResolver
- Parameters:
- context- Ignored
- base- Ignored
- Returns:
- Always null
 
 
- 
 
-