private AnnotationSource<O> addAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers) { @SuppressWarnings("unchecked") ListIterator<IExtendedModifier> iter = (ListIterator<IExtendedModifier>) modifiers.listIterator(); while (iter.hasNext() && iter.next().isAnnotation()) { //ignore these nodes } // the effect of this is to back up only if the last encountered modifier is _not_ an annotation: if (iter.hasPrevious() && iter.previous().isAnnotation()) { iter.next(); } AnnotationSource<O> annotation = new AnnotationImpl<>(target); iter.add((IExtendedModifier) annotation.getInternal()); return annotation; }
private AnnotationSource<O> addAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers) { @SuppressWarnings("unchecked") ListIterator<IExtendedModifier> iter = (ListIterator<IExtendedModifier>) modifiers.listIterator(); while (iter.hasNext() && iter.next().isAnnotation()) ; // the effect of this is to back up only if the last encountered modifier is _not_ an annotation: if (iter.hasPrevious() && iter.previous().isAnnotation()) { iter.next(); } AnnotationSource<O> annotation = new AnnotationImpl<O, T>(target); iter.add((IExtendedModifier) annotation.getInternal()); return annotation; }
private AnnotationSource<O> addAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers) { @SuppressWarnings("unchecked") ListIterator<IExtendedModifier> iter = (ListIterator<IExtendedModifier>) modifiers.listIterator(); while (iter.hasNext() && iter.next().isAnnotation()) ; // the effect of this is to back up only if the last encountered modifier is _not_ an annotation: if (iter.hasPrevious() && iter.previous().isAnnotation()) { iter.next(); } AnnotationSource<O> annotation = new AnnotationImpl<O, T>(target); iter.add((IExtendedModifier) annotation.getInternal()); return annotation; }
mvpCopy.setValue((Expression) result.getInternal()); iter.add(mvpCopy);
mvpCopy.setValue((Expression) result.getInternal()); iter.add(mvpCopy);
mvpCopy.setValue((Expression) result.getInternal()); iter.add(mvpCopy);
@Override public AnnotationSource<O> setAnnotationValue() { if (isMarker()) { convertTo(AnnotationType.SINGLE); } if (isSingleValue()) { final AnnotationSource<O> result = new Nested(this); ((SingleMemberAnnotation) annotation).setValue((Expression) result.getInternal()); return result; } return setAnnotationValue(DEFAULT_VALUE); }
@Override public AnnotationSource<O> setAnnotationValue() { if (isMarker()) { convertTo(AnnotationType.SINGLE); } if (isSingleValue()) { final AnnotationSource<O> result = new Nested(this); ((SingleMemberAnnotation) annotation).setValue((Expression) result.getInternal()); return result; } return setAnnotationValue(DEFAULT_VALUE); }
@Override public AnnotationSource<O> setAnnotationValue() { if (isMarker()) { convertTo(AnnotationType.SINGLE); } if (isSingleValue()) { final AnnotationSource<O> result = new Nested(this); ((SingleMemberAnnotation) annotation).setValue((Expression) result.getInternal()); return result; } return setAnnotationValue(DEFAULT_VALUE); }