1 16 package org.apache.xerces.impl.xs.traversers; 17 18 import org.w3c.dom.Element ; 19 import org.apache.xerces.impl.xs.opti.ElementImpl; 20 21 31 final class XSAnnotationInfo { 32 33 34 String fAnnotation; 35 36 37 int fLine; 38 39 40 int fColumn; 41 42 43 int fCharOffset; 44 45 46 XSAnnotationInfo next; 47 48 XSAnnotationInfo(String annotation, int line, int column, int charOffset) { 49 fAnnotation = annotation; 50 fLine = line; 51 fColumn = column; 52 fCharOffset = charOffset; 53 } 54 55 XSAnnotationInfo(String annotation, Element annotationDecl) { 56 fAnnotation = annotation; 57 if (annotationDecl instanceof ElementImpl) { 58 final ElementImpl annotationDeclImpl = (ElementImpl) annotationDecl; 59 fLine = annotationDeclImpl.getLineNumber(); 60 fColumn = annotationDeclImpl.getColumnNumber(); 61 fCharOffset = annotationDeclImpl.getCharacterOffset(); 62 } 63 else { 64 fLine = -1; 65 fColumn = -1; 66 fCharOffset = -1; 67 } 68 } 69 } | Popular Tags |