Package jakarta.servlet.jsp.el
Class ImportELResolver
- java.lang.Object
-
- jakarta.el.ELResolver
-
- jakarta.servlet.jsp.el.ImportELResolver
-
public class ImportELResolver extends ELResolver
Defines variable resolution behavior for Class imports and static imports.- Since:
- JSP 3.1
-
-
Field Summary
-
Fields inherited from class jakarta.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
-
-
Constructor Summary
Constructors Constructor Description ImportELResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<String>
getCommonPropertyType(ELContext context, Object base)
Always returnsnull
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.getCommonPropertyType(ELContext, Object)
.Class<Object>
getType(ELContext context, Object base, Object property)
Always returnsnull
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.getType(ELContext, Object, Object)
.Object
getValue(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.boolean
isReadOnly(ELContext context, Object base, Object property)
Always returnsfalse
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.isReadOnly(ELContext, Object, Object)
.void
setValue(ELContext context, Object base, Object property, Object val)
Always a NO-OP since in normal usageScopedAttributeELResolver
will handle calls toELResolver.setValue(ELContext, Object, Object, Object)
.-
Methods inherited from class jakarta.el.ELResolver
convertToType, getFeatureDescriptors, invoke
-
-
-
-
Method Detail
-
getValue
public Object getValue(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
propertyResolved
property of theELContext
object must be set totrue
by this resolver before returning if an import is matched. If this property is nottrue
after this method is called, the caller should ignore the return value.- Specified by:
getValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- Onlynull
is handled by this resolver. Other values will result in an immediate return.property
- The name of the import to resolve.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, then the import; otherwise undefined. - Throws:
NullPointerException
- if context isnull
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.
-
getType
public Class<Object> getType(ELContext context, Object base, Object property)
Always returnsnull
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.getType(ELContext, Object, Object)
.- Specified by:
getType
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- Ignoredproperty
- Ignored- Returns:
- Always
null
- Throws:
NullPointerException
- if context isnull
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.
-
setValue
public void setValue(ELContext context, Object base, Object property, Object val)
Always a NO-OP since in normal usageScopedAttributeELResolver
will handle calls toELResolver.setValue(ELContext, Object, Object, Object)
.- Specified by:
setValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- Ignoredproperty
- Ignoredval
- Ignored- Throws:
NullPointerException
- if context isnull
.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.
-
isReadOnly
public boolean isReadOnly(ELContext context, Object base, Object property)
Always returnsfalse
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.isReadOnly(ELContext, Object, Object)
.- Specified by:
isReadOnly
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- Ignoredproperty
- Ignored- Returns:
- Always
false
- Throws:
NullPointerException
- if context isnull
.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.
-
getCommonPropertyType
public Class<String> getCommonPropertyType(ELContext context, Object base)
Always returnsnull
since in normal usageScopedAttributeELResolver
will handle calls toELResolver.getCommonPropertyType(ELContext, Object)
.- Specified by:
getCommonPropertyType
in classELResolver
- Parameters:
context
- Ignoredbase
- Ignored- Returns:
- Always
null
-
-