public class ImportHandler extends Object
Constructor and Description |
---|
ImportHandler() |
Modifier and Type | Method and Description |
---|---|
void |
importClass(String name)
Import a class.
|
void |
importPackage(String packageName)
Import all the classes in a package.
|
void |
importStatic(String name)
Import a static field or method.
|
Class<?> |
resolveClass(String name)
Resolve a class name.
|
Class<?> |
resolveStatic(String name)
Resolve a static field or method name.
|
public void importStatic(String name) throws ELException
name
- The static member name, including the full class name, to be importedELException
- if the name does not include a ".".public void importClass(String name) throws ELException
name
- The full class name of the class to be importedELException
- if the name does not include a ".".public void importPackage(String packageName)
packageName
- The package name to be importedpublic Class<?> resolveClass(String name)
name
- The name of the class (without package name) to be resolved.importClass(java.lang.String)
or importPackage(java.lang.String)
, then its
Class instance. Otherwise null
.ELException
- if the class is abstract or is an interface, or not public.public Class<?> resolveStatic(String name)
name
- The name of the member(without package and class name) to be resolved.importStatic(java.lang.String)
, then the class object
representing the class that declares the static field or method. Otherwise null
.ELException
- if the class is not public, or is abstract or is an interface.Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.