public class ClassMap extends HashMap<Object,Object>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
ClassMap()
Constructs a hash table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fix(CtClass clazz)
Prevents a mapping from the specified class name to another name.
|
void |
fix(String name)
Prevents a mapping from the specified class name to another name.
|
Object |
get(Object jvmClassName)
Returns the class name to wihch the given
jvmClassName
is mapped. |
void |
put(CtClass oldname,
CtClass newname)
Maps a class name to another name in this hashtable.
|
void |
put(String oldname,
String newname)
Maps a class name to another name in this hashtable.
|
protected void |
put0(Object oldname,
Object newname) |
void |
putIfNone(String oldname,
String newname)
Is equivalent to
put() except that
the given mapping is not recorded into the hashtable
if another mapping from oldname is
already included. |
static String |
toJavaName(String classname)
Converts a class name from the internal representation used in
the JVM to the normal one used in Java.
|
static String |
toJvmName(String classname)
Converts a class name into the internal representation used in
the JVM.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic void put(CtClass oldname, CtClass newname)
Class.getName().
This method translates the given class names into the
internal form used in the JVM before putting it in
the hashtable.oldname - the original class namenewname - the substituted class name.public void put(String oldname, String newname)
If oldname is identical to
newname, then this method does not
perform anything; it does not record the mapping from
oldname to newname. See
fix method.
oldname - the original class name.newname - the substituted class name.fix(String)public void putIfNone(String oldname, String newname)
put() except that
the given mapping is not recorded into the hashtable
if another mapping from oldname is
already included.oldname - the original class name.newname - the substituted class name.public Object get(Object jvmClassName)
jvmClassName
is mapped. A subclass of this class should override this method.
This method receives and returns the internal representation of class name used in the JVM.
get in interface Map<Object,Object>get in class HashMap<Object,Object>toJvmName(String),
toJavaName(String)public void fix(CtClass clazz)
public void fix(String name)
public static String toJvmName(String classname)
Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.