public class PandaModule extends Object implements Module
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Module> |
modules |
protected String |
name |
protected @Nullable Module |
parent |
protected TypesMap |
types |
| Constructor and Description |
|---|
PandaModule(Module parent,
String name) |
PandaModule(String name) |
| Modifier and Type | Method and Description |
|---|---|
Type |
add(Type type)
Add reference to type to the module
|
Module |
allocate(String moduleQualifier)
Allocates module with the given qualifier
|
int |
countTypes()
Count all available types
|
int |
countUsedTypes()
Count used types
|
protected io.vavr.control.Option<Module> |
fetch(String moduleQualifier,
boolean compute) |
io.vavr.control.Option<Type> |
forClass(Class<?> associatedClass)
Find reference using the given class
|
io.vavr.control.Option<Type> |
forName(CharSequence typeName)
Find reference using the given name
|
io.vavr.control.Option<Module> |
get(String moduleQualifier)
Get module with the given name
|
Collection<Type> |
getAllTypes()
Get all types (also from submodules)
Iterable is used instead of collection because of the performance reasons.
|
Collection<? extends Module> |
getModules()
Get all submodules
|
String |
getName()
Get name of module
|
Collection<? extends String> |
getNames()
Get all names of modules
|
io.vavr.control.Option<Module> |
getParent()
Get parent module
|
Collection<Type> |
getTypes()
Get types that belongs to the module
|
void |
include(Module module)
Add module
|
boolean |
isSubmodule(Module module)
Check if the given module is submodule of the current module
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasType, hasTypeallocate, get, getModules, getNames, includerequireType, requireTypeprotected final String name
protected final TypesMap types
@Nullable protected @Nullable Module parent
public PandaModule(String name)
public Type add(Type type)
Modulepublic int countUsedTypes()
ModulescountUsedTypes in interface Modulespublic int countTypes()
ModulescountTypes in interface Modulespublic boolean isSubmodule(Module module)
ModuleisSubmodule in interface Modulemodule - the module to checkpublic io.vavr.control.Option<Type> forClass(Class<?> associatedClass)
ModuleResourceforClass in interface ModuleResourceassociatedClass - the class associated with type to search forpublic io.vavr.control.Option<Type> forName(CharSequence typeName)
ModuleResourceforName in interface ModuleResourcetypeName - the name to search forpublic Collection<Type> getAllTypes()
ModulegetAllTypes in interface Modulepublic Collection<Type> getTypes()
Modulepublic io.vavr.control.Option<Module> getParent()
Modulepublic io.vavr.control.Option<Module> get(String moduleQualifier)
Modulespublic Module allocate(String moduleQualifier)
Modulespublic Collection<? extends String> getNames()
Modulespublic Collection<? extends Module> getModules()
ModulesgetModules in interface ModulesCopyright © 2020. All rights reserved.