public static XField createXField(FieldAnnotation f) { return createXField(f.getClassName(), f.getFieldName(), f.getFieldSignature(), f.isStatic()); }
public FieldDescriptor getFieldDescriptor(FieldAnnotation ma) { return getFieldDescriptor(ClassName.toSlashedClassName(ma.getClassName()), ma.getFieldName(), ma.getFieldSignature(), ma.isStatic()); }
String methodClass = ""; if (primeField != null) { fieldClass = primeField.getClassName();
/** * Rewrite a FieldAnnotation to update the class name and field signature, * if needed. * * @param classNameRewriter * a ClassNameRewriter * @param annotation * a FieldAnnotation * @return the possibly-rewritten FieldAnnotation */ public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new FieldAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), annotation.getFieldName(), rewriteSignature(classNameRewriter, annotation.getFieldSignature()), annotation.isStatic()); } return annotation; }
static FieldAnnotation obfuscate(FieldAnnotation m) { FieldAnnotation result = new FieldAnnotation(hashClass(m.getClassName()), hashData(m.getFieldName()), hashSignature(m.getFieldSignature()), m.isStatic()); result.setDescription(m.getDescription()); return result; }
@Override public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException { XMLAttributeList attributeList = new XMLAttributeList().addAttribute("classname", getClassName()) .addAttribute("name", getFieldName()).addAttribute("signature", getFieldSignature()); if (fieldSourceSig != null) { attributeList.addAttribute("sourceSignature", fieldSourceSig); } attributeList.addAttribute("isStatic", String.valueOf(isStatic())); if (isPrimary) { attributeList.addAttribute("primary", "true"); } String role = getDescription(); if (!DEFAULT_ROLE.equals(role)) { attributeList.addAttribute("role", role); } xmlOutput.openTag(ELEMENT_NAME, attributeList); getSourceLines().writeXML(xmlOutput, addMessages, false); if (addMessages) { xmlOutput.openTag(BugAnnotation.MESSAGE_TAG); xmlOutput.writeText(this.toString()); xmlOutput.closeTag(BugAnnotation.MESSAGE_TAG); } xmlOutput.closeTag(ELEMENT_NAME); } }
if ("separator".equals(field.getFieldName()) && "java.io.File".equals(field.getClassName())) { i.setSpecialKind(Item.FILE_SEPARATOR_STRING);
public static XField createXField(FieldAnnotation f) { return createXField(f.getClassName(), f.getFieldName(), f.getFieldSignature(), f.isStatic()); }
public FieldDescriptor getFieldDescriptor(FieldAnnotation ma) { return getFieldDescriptor(ClassName.toSlashedClassName(ma.getClassName()), ma.getFieldName(), ma.getFieldSignature(), ma.isStatic()); }
String methodClass = ""; if (primeField != null) { fieldClass = primeField.getClassName();
static FieldAnnotation obfuscate(FieldAnnotation m) { FieldAnnotation result = new FieldAnnotation(hashClass(m.getClassName()), hashData(m.getFieldName()), hashSignature(m.getFieldSignature()), m.isStatic()); result.setDescription(m.getDescription()); return result; }
/** * Rewrite a FieldAnnotation to update the class name and field signature, * if needed. * * @param classNameRewriter * a ClassNameRewriter * @param annotation * a FieldAnnotation * @return the possibly-rewritten FieldAnnotation */ public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new FieldAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), annotation.getFieldName(), rewriteSignature(classNameRewriter, annotation.getFieldSignature()), annotation.isStatic()); } return annotation; }
@Override public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException { XMLAttributeList attributeList = new XMLAttributeList().addAttribute("classname", getClassName()) .addAttribute("name", getFieldName()).addAttribute("signature", getFieldSignature()); if (fieldSourceSig != null) { attributeList.addAttribute("sourceSignature", fieldSourceSig); } attributeList.addAttribute("isStatic", String.valueOf(isStatic())); if (isPrimary) { attributeList.addAttribute("primary", "true"); } String role = getDescription(); if (!DEFAULT_ROLE.equals(role)) { attributeList.addAttribute("role", role); } xmlOutput.openTag(ELEMENT_NAME, attributeList); getSourceLines().writeXML(xmlOutput, addMessages, false); if (addMessages) { xmlOutput.openTag(BugAnnotation.MESSAGE_TAG); xmlOutput.writeText(this.toString()); xmlOutput.closeTag(BugAnnotation.MESSAGE_TAG); } xmlOutput.closeTag(ELEMENT_NAME); } }
if ("separator".equals(field.getFieldName()) && "java.io.File".equals(field.getClassName())) { i.setSpecialKind(Item.FILE_SEPARATOR_STRING);