public class ClassAliasPool extends Object implements ClassLookup
Modifier and Type | Field and Description |
---|---|
static ClassAliasPool |
CLASS_ALIASES |
Modifier and Type | Method and Description |
---|---|
static void |
a(Class... classes) |
static void |
a(Class<?> clazz) |
void |
addAlias(Class<?>... classes)
Add classes to the class lookup.
|
void |
addAlias(Class<?> clazz,
@NotNull String names)
Add a class with a specific alias which may or may not have a package name.
|
void |
clean()
remove classes which are not in the default class loaders.
|
@NotNull Class<?> |
forName(@NotNull CharSequence name)
Turn a string into a class
|
String |
nameFor(Class<?> clazz) |
void |
removePackage(String pkgName) |
protected static boolean |
testPackage(String pkgName,
Class<?> clazz) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
wrap, wrap
public static final ClassAliasPool CLASS_ALIASES
public static void a(Class<?> clazz)
public void clean()
@NotNull public @NotNull Class<?> forName(@NotNull @NotNull CharSequence name) throws ClassNotFoundRuntimeException
ClassLookup
forName
in interface ClassLookup
name
- of the type/classClassNotFoundRuntimeException
public String nameFor(Class<?> clazz) throws IllegalArgumentException
nameFor
in interface ClassLookup
clazz
- to lookup an alias forIllegalArgumentException
- if used on a lambda function.public void removePackage(String pkgName)
public void addAlias(@NotNull Class<?>... classes)
ClassLookup
addAlias
in interface ClassLookup
classes
- to addpublic void addAlias(Class<?> clazz, @NotNull @NotNull String names)
ClassLookup
addAlias
in interface ClassLookup
clazz
- to aliasnames
- An alias or comma seperated list of aliasespublic static void a(Class... classes)
Copyright © 2022. All rights reserved.