1 package net.sourceforge.pmd.util.viewer.model; 2 3 4 import net.sourceforge.pmd.jaxen.Attribute; 5 6 7 13 14 public class AttributeToolkit { 15 16 22 public static String formatValueForXPath(Attribute attribute) { 23 return '\'' + attribute.getValue() + '\''; 24 } 25 26 32 public static String constructPredicate(Attribute attribute) { 33 return "[@" + attribute.getName() + '=' + 34 formatValueForXPath(attribute) + ']'; 35 } 36 } | Popular Tags |