public static final TypeName parseForReturnTypeName(Language l, String desc) throws IllegalArgumentException { return parseForReturnTypeName(l, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(String desc) throws IllegalArgumentException { return parseForReturnTypeName(Language.JAVA, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(Language l, String desc) throws IllegalArgumentException { return parseForReturnTypeName(l, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(String desc) throws IllegalArgumentException { return parseForReturnTypeName(Language.JAVA, ImmutableByteArray.make(desc)); }
/** * @param b a byte array holding the string representation of this descriptor * @return the canonical representative for this descriptor value */ public static Descriptor findOrCreate(Language l, ImmutableByteArray b) throws IllegalArgumentException { TypeName returnType = StringStuff.parseForReturnTypeName(l, b); TypeName[] parameters = StringStuff.parseForParameterNames(l, b); Key k = new Key(returnType, parameters); Descriptor result = map.get(k); if (result == null) { result = new Descriptor(k); map.put(k, result); } return result; }
/** * @param b a byte array holding the string representation of this descriptor * @return the canonical representative for this descriptor value */ public static Descriptor findOrCreate(Language l, ImmutableByteArray b) throws IllegalArgumentException { TypeName returnType = StringStuff.parseForReturnTypeName(l, b); TypeName[] parameters = StringStuff.parseForParameterNames(l, b); Key k = new Key(returnType, parameters); Descriptor result = map.get(k); if (result == null) { result = new Descriptor(k); map.put(k, result); } return result; }