public class AliasCatalog extends Object
Constructor and Description |
---|
AliasCatalog() |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String name,
Class type)
Create an alias with name for a type given.
|
Map<String,Class> |
getAliases() |
Class |
getClassFor(String name)
Get the class for the given name, using alias if fitting.
|
String |
getClassNameFor(String name)
Fetch the name of the class if it is an alias, else gives the name itself.
|
boolean |
isAlias(String alias)
Allow verification of the string to assert if it is an alias to type.
|
public boolean isAlias(String alias)
alias
- The alias to be search.public String getClassNameFor(String name)
name
- The name of the class or alias.public Class getClassFor(String name) throws ClassNotFoundException
name
- The name or alias of the class to be loaded.ClassNotFoundException
- If it is not an alias and name represents a class that can't be loaded.Copyright © 2014. All Rights Reserved.