javax.el

Class ImportHandler


  • public class ImportHandler
    extends Object
    Handles imports of class names and package names. An imported package name implicitly imports all the classes in the package. A class that has been imported can be used without its package name. The name is resolved to its full (package and class) name at evaluation time.
    • Constructor Detail

      • ImportHandler

        public ImportHandler()
    • Method Detail

      • importStatic

        public void importStatic(String name)
                          throws ELException
        Import a static field or method.
        Parameters:
        name - The static member name, including the full class name, to be imported
        Throws:
        ELException - if the name does not include a ".".
      • importClass

        public void importClass(String name)
                         throws ELException
        Import a class.
        Parameters:
        name - The full class name of the class to be imported
        Throws:
        ELException - if the name does not include a ".".
      • importPackage

        public void importPackage(String packageName)
        Import all the classes in a package.
        Parameters:
        packageName - The package name to be imported
      • resolveStatic

        public Class<?> resolveStatic(String name)
        Resolve a static field or method name.
        Parameters:
        name - The name of the member(without package and class name) to be resolved.
        Returns:
        If the field or method has been imported previously, with importStatic(java.lang.String), then the class object representing the class that declares the static field or method. Otherwise null.
        Throws:
        ELException - if the class is not public, or is abstract or is an interface.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/el/ImportHandler.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com, ImportHandler (Java(TM) EE 7 Specification APIs)

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.