protected AnnotationBinding[] getAnnotationBindings() { AnnotationBinding[] oldies = ((ArrayBinding)_binding).getTypeAnnotations(); AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS; // Strip out the annotations on sub arrays for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, 0, newbies = new AnnotationBinding[i], 0, i); return newbies; } } return newbies; }
protected AnnotationBinding[] getAnnotationBindings() { AnnotationBinding[] oldies = ((ArrayBinding)_binding).getTypeAnnotations(); AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS; // Strip out the annotations on sub arrays for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, 0, newbies = new AnnotationBinding[i], 0, i); return newbies; } } return newbies; }
protected AnnotationBinding[] getAnnotationBindings() { AnnotationBinding[] oldies = ((ArrayBinding)_binding).getTypeAnnotations(); AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS; // Strip out the annotations on sub arrays for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, 0, newbies = new AnnotationBinding[i], 0, i); return newbies; } } return newbies; }
private org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] getTypeAnnotations(int dimensions, ArrayBinding arrayBinding, boolean isVarargs) { org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding [] oldies = arrayBinding.getTypeAnnotations(); org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS; // Skip past extended dimensions encoded ahead of base dimensions. Dimension for variable argument array comes after the base dimensions. int extendedDimensions = arrayBinding.dimensions - dimensions - (isVarargs ? 1 : 0); int i, length; for (i = 0, length = oldies == null ? 0 : oldies.length; i < length && extendedDimensions > 0 ; i++) { if (oldies[i] == null) extendedDimensions--; } int cells = 0; for (int j = i; j < length && dimensions > 0 ; j++) { if (oldies[j] == null) dimensions--; cells ++; } if (cells > 0) System.arraycopy(oldies, i, newbies = new org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[cells], 0, cells); return newbies; }
private org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] getTypeAnnotations(int dimensions, ArrayBinding arrayBinding, boolean isVarargs) { org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding [] oldies = arrayBinding.getTypeAnnotations(); org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS; // Skip past extended dimensions encoded ahead of base dimensions. Dimension for variable argument array comes after the base dimensions. int extendedDimensions = arrayBinding.dimensions - dimensions - (isVarargs ? 1 : 0); int i, length; for (i = 0, length = oldies == null ? 0 : oldies.length; i < length && extendedDimensions > 0 ; i++) { if (oldies[i] == null) extendedDimensions--; } int cells = 0; for (int j = i; j < length && dimensions > 0 ; j++) { if (oldies[j] == null) dimensions--; cells ++; } if (cells > 0) System.arraycopy(oldies, i, newbies = new org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[cells], 0, cells); return newbies; }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public TypeBinding elementsType() { if (this.dimensions == 1) return this.leafComponentType; AnnotationBinding [] oldies = getTypeAnnotations(); AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS; for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) { if (oldies[i] == null) { System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1); break; } } return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }
@Override public String annotatedDebugName() { StringBuffer brackets = new StringBuffer(this.dimensions * 2); brackets.append(this.leafComponentType.annotatedDebugName()); brackets.append(' '); AnnotationBinding [] annotations = getTypeAnnotations(); for (int i = 0, j = -1; i < this.dimensions; i++) { if (annotations != null) { if (i != 0) brackets.append(' '); while (++j < annotations.length && annotations[j] != null) { brackets.append(annotations[j]); brackets.append(' '); } } brackets.append("[]"); //$NON-NLS-1$ } return brackets.toString(); }