public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) { ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType); int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length; TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength]; for (int i = 0; i < typeArgumentsLength; i++) { unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]); } ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS); if (parameterizedType != null) return parameterizedType; parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment); cacheDerivedType(unannotatedGenericType, parameterizedType); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); int typesLength = this.types.length; if (this.typeid == typesLength) System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength); this.types[this.typeid] = new TypeBinding[1]; return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) { ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType); int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length; TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength]; for (int i = 0; i < typeArgumentsLength; i++) { unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]); } ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS); if (parameterizedType != null) return parameterizedType; parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment); cacheDerivedType(unannotatedGenericType, parameterizedType); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); int typesLength = this.types.length; if (this.typeid == typesLength) System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength); this.types[this.typeid] = new TypeBinding[1]; return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) { ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType); int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length; TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength]; for (int i = 0; i < typeArgumentsLength; i++) { unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]); } ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS); if (parameterizedType != null) return parameterizedType; parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment); cacheDerivedType(unannotatedGenericType, parameterizedType); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); int typesLength = this.types.length; if (this.typeid == typesLength) System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength); this.types[this.typeid] = new TypeBinding[1]; return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) { ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType); int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length; TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength]; for (int i = 0; i < typeArgumentsLength; i++) { unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]); } ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS); if (parameterizedType != null) return parameterizedType; parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment); cacheDerivedType(unannotatedGenericType, parameterizedType); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); int typesLength = this.types.length; if (this.typeid == typesLength) System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength); this.types[this.typeid] = new TypeBinding[1]; return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) { ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType); int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length; TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength]; for (int i = 0; i < typeArgumentsLength; i++) { unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]); } ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS); if (parameterizedType != null) return parameterizedType; parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment); cacheDerivedType(unannotatedGenericType, parameterizedType); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); int typesLength = this.types.length; if (this.typeid == typesLength) System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength); this.types[this.typeid] = new TypeBinding[1]; return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType); }
@Override public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) { if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String> throw new IllegalStateException(); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations); if (parameterizedType != null) return parameterizedType; ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType); if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations)) return nakedType; parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment); parameterizedType.id = nakedType.id; parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) { if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String> throw new IllegalStateException(); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations); if (parameterizedType != null) return parameterizedType; ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType); if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations)) return nakedType; parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment); parameterizedType.id = nakedType.id; parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) { if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String> throw new IllegalStateException(); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations); if (parameterizedType != null) return parameterizedType; ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType); if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations)) return nakedType; parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment); parameterizedType.id = nakedType.id; parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) { if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String> throw new IllegalStateException(); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations); if (parameterizedType != null) return parameterizedType; ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType); if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations)) return nakedType; parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment); parameterizedType.id = nakedType.id; parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType); }
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) { if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String> throw new IllegalStateException(); ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations); if (parameterizedType != null) return parameterizedType; ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType); if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations)) return nakedType; parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment); parameterizedType.id = nakedType.id; parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); this.parameterizedTypes.put(genericType, typeArguments, enclosingType, parameterizedType); return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType); }