protected Annotation createAnnotation(JavaElement parent, String name) { return new Annotation(parent, name); } protected SourceField createField(JavaElement parent, FieldInfo fieldInfo) {
public ISourceRange getNameRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { ClassFile classFile = (ClassFile)getClassFile(); if (classFile != null) { // ensure the class file's buffer is open so that source ranges are computed classFile.getBuffer(); return mapper.getNameRange(this); } } Object info = getElementInfo(); if (info instanceof AnnotationInfo) { AnnotationInfo annotationInfo = (AnnotationInfo) info; return new SourceRange(annotationInfo.nameStart, annotationInfo.nameEnd - annotationInfo.nameStart + 1); } return null; }
protected void toStringName(StringBuffer buffer) { buffer.append('@'); buffer.append(getElementName()); } }
public ISourceRange getSourceRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { // ensure the class file's buffer is open so that source ranges are computed ClassFile classFile = (ClassFile)getClassFile(); if (classFile != null) { classFile.getBuffer(); return mapper.getSourceRange(this); } } return super.getSourceRange(); }
public IMember getDeclaringMember() { return (IMember) getParent(); }
Annotation annotation = (Annotation) value; for (int j = 0; j < i; j++) { if (annotation.equals(values[j])) { annotation.occurrenceCount++;
public IMemberValuePair[] getMemberValuePairs() throws JavaModelException { Object info = getElementInfo(); if (info instanceof AnnotationInfo) return ((AnnotationInfo) info).members; IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs(); int length = binaryAnnotations.length; IMemberValuePair[] result = new IMemberValuePair[length]; for (int i = 0; i < length; i++) { IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i]; MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName())); memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue()); result[i] = memberValuePair; } return result; }
public ISourceRange getSourceRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { // ensure the class file's buffer is open so that source ranges are computed ClassFile classFile = (ClassFile)getClassFile(); if (classFile != null) { classFile.getBuffer(); return mapper.getSourceRange(this); } } return super.getSourceRange(); }
public IMember getDeclaringMember() { return (IMember) getParent(); }
Annotation annotation = (Annotation) value; for (int j = 0; j < i; j++) { if (annotation.equals(values[j])) { annotation.occurrenceCount++;
public IMemberValuePair[] getMemberValuePairs() throws JavaModelException { Object info = getElementInfo(); if (info instanceof AnnotationInfo) return ((AnnotationInfo) info).members; IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs(); int length = binaryAnnotations.length; IMemberValuePair[] result = new IMemberValuePair[length]; for (int i = 0; i < length; i++) { IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i]; MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName())); memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue()); result[i] = memberValuePair; } return result; }
public IAnnotation getAnnotation(String name) { return new Annotation(this, name); } public IAnnotation[] getAnnotations() throws JavaModelException {
public ISourceRange getNameRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { ClassFile classFile = (ClassFile)getClassFile(); if (classFile != null) { // ensure the class file's buffer is open so that source ranges are computed classFile.getBuffer(); return mapper.getNameRange(this); } } Object info = getElementInfo(); if (info instanceof AnnotationInfo) { AnnotationInfo annotationInfo = (AnnotationInfo) info; return new SourceRange(annotationInfo.nameStart, annotationInfo.nameEnd - annotationInfo.nameStart + 1); } return null; }
@Override public ISourceRange getSourceRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { // ensure the class file's buffer is open so that source ranges are computed IClassFile classFile = getClassFile(); if (classFile != null) { classFile.getBuffer(); return mapper.getSourceRange(this); } } return super.getSourceRange(); }
public IMember getDeclaringMember() { return (IMember) getParent(); }
Annotation annotation = (Annotation) value; for (int j = 0; j < i; j++) { if (annotation.equals(values[j])) { annotation.occurrenceCount++;
protected void toStringName(StringBuffer buffer) { buffer.append('@'); buffer.append(getElementName()); } }
public IMemberValuePair[] getMemberValuePairs() throws JavaModelException { Object info = getElementInfo(); if (info instanceof AnnotationInfo) return ((AnnotationInfo) info).members; IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs(); int length = binaryAnnotations.length; IMemberValuePair[] result = new IMemberValuePair[length]; for (int i = 0; i < length; i++) { IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i]; MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName())); memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue()); result[i] = memberValuePair; } return result; }
public IAnnotation getAnnotation(String name) { return new Annotation(this, name); } public IAnnotation[] getAnnotations() throws JavaModelException {
public ISourceRange getNameRange() throws JavaModelException { SourceMapper mapper= getSourceMapper(); if (mapper != null) { ClassFile classFile = (ClassFile)getClassFile(); if (classFile != null) { // ensure the class file's buffer is open so that source ranges are computed classFile.getBuffer(); return mapper.getNameRange(this); } } Object info = getElementInfo(); if (info instanceof AnnotationInfo) { AnnotationInfo annotationInfo = (AnnotationInfo) info; return new SourceRange(annotationInfo.nameStart, annotationInfo.nameEnd - annotationInfo.nameStart + 1); } return null; }