ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnvironment) { if (this.localArrayBindings == null) { this.localArrayBindings = new ArrayBinding[] {new ArrayBinding(this, dimensionCount, lookupEnvironment)}; return this.localArrayBindings[0]; } // find the cached array binding for this dimensionCount (if any) int length = this.localArrayBindings.length; for (int i = 0; i < length; i++) if (this.localArrayBindings[i].dimensions == dimensionCount) return this.localArrayBindings[i]; // no matching array System.arraycopy(this.localArrayBindings, 0, this.localArrayBindings = new ArrayBinding[length + 1], 0, length); return this.localArrayBindings[length] = new ArrayBinding(this, dimensionCount, lookupEnvironment); }
ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnvironment) { if (this.localArrayBindings == null) { this.localArrayBindings = new ArrayBinding[] {new ArrayBinding(this, dimensionCount, lookupEnvironment)}; return this.localArrayBindings[0]; } // find the cached array binding for this dimensionCount (if any) int length = this.localArrayBindings.length; for (int i = 0; i < length; i++) if (this.localArrayBindings[i].dimensions == dimensionCount) return this.localArrayBindings[i]; // no matching array System.arraycopy(this.localArrayBindings, 0, this.localArrayBindings = new ArrayBinding[length + 1], 0, length); return this.localArrayBindings[length] = new ArrayBinding(this, dimensionCount, lookupEnvironment); }
ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnvironment) { if (this.localArrayBindings == null) { this.localArrayBindings = new ArrayBinding[] {new ArrayBinding(this, dimensionCount, lookupEnvironment)}; return this.localArrayBindings[0]; } // find the cached array binding for this dimensionCount (if any) int length = this.localArrayBindings.length; for (int i = 0; i < length; i++) if (this.localArrayBindings[i].dimensions == dimensionCount) return this.localArrayBindings[i]; // no matching array System.arraycopy(this.localArrayBindings, 0, this.localArrayBindings = new ArrayBinding[length + 1], 0, length); return this.localArrayBindings[length] = new ArrayBinding(this, dimensionCount, lookupEnvironment); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension) { if (type.isValidBinding()) return environment().createArrayType(type, dimension); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension) { if (type.isValidBinding()) return environment().createArrayType(type, dimension); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension) { if (type.isValidBinding()) return environment().createArrayType(type, dimension); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) { if (type.isValidBinding()) return environment().createArrayType(type, dimension, annotations); // do not cache obvious invalid types return new ArrayBinding(type, dimension, environment()); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions) { TypeBinding unannotatedLeafType = getUnannotatedType(leafType); TypeBinding[] derivedTypes = this.types[unannotatedLeafType.id]; int i, length = derivedTypes.length; for (i = 0; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.hasTypeAnnotations()) continue; if (derivedType.leafComponentType() == unannotatedLeafType && derivedType.dimensions() == dimensions) //$IDENTITY-COMPARISON$ return (ArrayBinding) derivedType; } if (i == length) { System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length); this.types[unannotatedLeafType.id] = derivedTypes; } TypeBinding arrayType = derivedTypes[i] = new ArrayBinding(unannotatedLeafType, dimensions, this.environment); 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 (ArrayBinding) (this.types[arrayType.id = this.typeid++][0] = arrayType); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions) { TypeBinding unannotatedLeafType = getUnannotatedType(leafType); TypeBinding[] derivedTypes = this.types[unannotatedLeafType.id]; int i, length = derivedTypes.length; for (i = 0; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.hasTypeAnnotations()) continue; if (derivedType.leafComponentType() == unannotatedLeafType && derivedType.dimensions() == dimensions) //$IDENTITY-COMPARISON$ return (ArrayBinding) derivedType; } if (i == length) { System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length); this.types[unannotatedLeafType.id] = derivedTypes; } TypeBinding arrayType = derivedTypes[i] = new ArrayBinding(unannotatedLeafType, dimensions, this.environment); 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 (ArrayBinding) (this.types[arrayType.id = this.typeid++][0] = arrayType); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions) { if (leafType instanceof ArrayBinding) { dimensions += leafType.dimensions(); leafType = leafType.leafComponentType(); } TypeBinding unannotatedLeafType = getUnannotatedType(leafType); TypeBinding[] derivedTypes = this.types[unannotatedLeafType.id]; int i, length = derivedTypes.length; for (i = 0; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.hasTypeAnnotations()) continue; if (derivedType.leafComponentType() == unannotatedLeafType && derivedType.dimensions() == dimensions) //$IDENTITY-COMPARISON$ return (ArrayBinding) derivedType; } if (i == length) { System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length); this.types[unannotatedLeafType.id] = derivedTypes; } TypeBinding arrayType = derivedTypes[i] = new ArrayBinding(unannotatedLeafType, dimensions, this.environment); 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 (ArrayBinding) (this.types[arrayType.id = this.typeid++][0] = arrayType); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions, AnnotationBinding [] annotations) { ArrayBinding nakedType = null; TypeBinding[] derivedTypes = getDerivedTypes(leafType); for (int i = 0, length = derivedTypes.length; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.dimensions() != dimensions || derivedType.leafComponentType() != leafType) //$IDENTITY-COMPARISON$ continue; if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations)) return (ArrayBinding) derivedType; if (!derivedType.hasTypeAnnotations()) nakedType = (ArrayBinding) derivedType; } if (nakedType == null) nakedType = super.getArrayType(leafType, dimensions); if (!haveTypeAnnotations(leafType, annotations)) return nakedType; ArrayBinding arrayType = new ArrayBinding(leafType, dimensions, this.environment); arrayType.id = nakedType.id; arrayType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); return (ArrayBinding) cacheDerivedType(leafType, nakedType, arrayType); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions, AnnotationBinding [] annotations) { ArrayBinding nakedType = null; TypeBinding[] derivedTypes = getDerivedTypes(leafType); for (int i = 0, length = derivedTypes.length; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.dimensions() != dimensions || derivedType.leafComponentType() != leafType) //$IDENTITY-COMPARISON$ continue; if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations)) return (ArrayBinding) derivedType; if (!derivedType.hasTypeAnnotations()) nakedType = (ArrayBinding) derivedType; } if (nakedType == null) nakedType = super.getArrayType(leafType, dimensions); if (!haveTypeAnnotations(leafType, annotations)) return nakedType; ArrayBinding arrayType = new ArrayBinding(leafType, dimensions, this.environment); arrayType.id = nakedType.id; arrayType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); return (ArrayBinding) cacheDerivedType(leafType, nakedType, arrayType); }
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions, AnnotationBinding [] annotations) { ArrayBinding nakedType = null; TypeBinding[] derivedTypes = getDerivedTypes(leafType); for (int i = 0, length = derivedTypes.length; i < length; i++) { TypeBinding derivedType = derivedTypes[i]; if (derivedType == null) break; if (!derivedType.isArrayType() || derivedType.dimensions() != dimensions || derivedType.leafComponentType() != leafType) //$IDENTITY-COMPARISON$ continue; if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations)) return (ArrayBinding) derivedType; if (!derivedType.hasTypeAnnotations()) nakedType = (ArrayBinding) derivedType; } if (nakedType == null) nakedType = super.getArrayType(leafType, dimensions); if (!haveTypeAnnotations(leafType, annotations)) return nakedType; ArrayBinding arrayType = new ArrayBinding(leafType, dimensions, this.environment); arrayType.id = nakedType.id; arrayType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled); return (ArrayBinding) cacheDerivedType(leafType, nakedType, arrayType); }