public final class PandaImports extends Object implements Imports
| Constructor and Description |
|---|
PandaImports(ModulePath modulePath,
TypeLoader typeLoader) |
| Modifier and Type | Method and Description |
|---|---|
io.vavr.control.Option<Type> |
forClass(@Nullable Class<?> associatedClass)
Imports does not support this method
|
io.vavr.control.Option<Type> |
forName(CharSequence name)
Find reference using the given name
|
TypeLoader |
getTypeLoader()
Get associated type loader
|
void |
importModule(Module module)
Import module
|
void |
importModule(String name)
Import module using the given name
|
boolean |
importType(String name,
Type type)
Import reference
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrequireType, requireTypepublic PandaImports(ModulePath modulePath, TypeLoader typeLoader)
public void importModule(String name)
ImportsimportModule in interface Importsname - the name of modulepublic void importModule(Module module)
ImportsimportModule in interface Importsmodule - the module to import
// @return if type with the given name is already imported, the method will interrupt importing and return the name of that typepublic boolean importType(String name, Type type)
ImportsimportType in interface Importsname - the name of type to import as (may be different than type name)type - the reference to typepublic io.vavr.control.Option<Type> forClass(@Nullable @Nullable Class<?> associatedClass)
forClass in interface ModuleResourceassociatedClass - the class associated with type to search forpublic io.vavr.control.Option<Type> forName(CharSequence name)
ModuleResourceforName in interface ModuleResourcename - the name to search forpublic TypeLoader getTypeLoader()
ImportsgetTypeLoader in interface ImportsCopyright © 2020. All rights reserved.