parent
620dd15d00
commit
0b92907149
|
@ -10,9 +10,6 @@
|
|||
*******************************************************************************/
|
||||
package com.ibm.wala.types;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ibm.wala.classLoader.Language;
|
||||
import com.ibm.wala.util.strings.Atom;
|
||||
|
||||
|
@ -27,17 +24,8 @@ public final class Selector {
|
|||
|
||||
private final Descriptor descriptor;
|
||||
|
||||
private final String s;
|
||||
|
||||
private static final Map<String,Selector> CACHE = new HashMap<String,Selector>();
|
||||
|
||||
public static Selector make(String selectorStr) {
|
||||
Selector ret = CACHE.get(selectorStr);
|
||||
if (ret == null) {
|
||||
ret = make(Language.JAVA, selectorStr);
|
||||
CACHE.put(selectorStr, ret);
|
||||
}
|
||||
return ret;
|
||||
return make(Language.JAVA, selectorStr);
|
||||
}
|
||||
|
||||
public static Selector make(Language l, String selectorStr) {
|
||||
|
@ -56,7 +44,6 @@ public final class Selector {
|
|||
public Selector(Atom name, Descriptor descriptor) {
|
||||
this.name = name;
|
||||
this.descriptor = descriptor;
|
||||
this.s = name.toString() + descriptor.toString();
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("null name");
|
||||
}
|
||||
|
@ -83,7 +70,7 @@ public final class Selector {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return s;
|
||||
return name.toString() + descriptor.toString();
|
||||
}
|
||||
|
||||
public Descriptor getDescriptor() {
|
||||
|
|
Loading…
Reference in New Issue