/** * Returns the unique instance corresponding to the * given method descriptor. See vmspec-2 sec4.3.3 for details on the * field descriptor syntax. * * @param descriptor {@code non-null;} the descriptor * @return {@code non-null;} the corresponding instance * @throws IllegalArgumentException thrown if the descriptor has * invalid syntax */ public static Prototype intern(String descriptor) { if (descriptor == null) { throw new NullPointerException("descriptor == null"); } Prototype result = internTable.get(descriptor); if (result != null) { return result; } result = fromDescriptor(descriptor); return putIntern(result); }
/** * Returns the unique instance corresponding to the * given method descriptor. See vmspec-2 sec4.3.3 for details on the * field descriptor syntax. * * @param descriptor {@code non-null;} the descriptor * @return {@code non-null;} the corresponding instance * @throws IllegalArgumentException thrown if the descriptor has * invalid syntax */ public static Prototype intern(String descriptor) { if (descriptor == null) { throw new NullPointerException("descriptor == null"); } Prototype result = internTable.get(descriptor); if (result != null) { return result; } result = fromDescriptor(descriptor); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
/** * Returns a new interned instance, which is the same as this instance, * except that it has an additional parameter prepended to the original's * argument list. * * @param param {@code non-null;} the new first parameter * @return {@code non-null;} an appropriately-constructed instance */ public Prototype withFirstParameter(Type param) { String newDesc = "(" + param.getDescriptor() + descriptor.substring(1); StdTypeList newParams = parameterTypes.withFirst(param); newParams.setImmutable(); Prototype result = new Prototype(newDesc, returnType, newParams); return putIntern(result); }
return putIntern(result);
return putIntern(result);
return putIntern(result);
return putIntern(result);
return putIntern(result);
return putIntern(result);