本文整理汇总了Java中edu.umd.cs.findbugs.util.Strings类的典型用法代码示例。如果您正苦于以下问题:Java Strings类的具体用法?Java Strings怎么用?Java Strings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Strings类属于edu.umd.cs.findbugs.util包,在下文中一共展示了Strings类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
@Override
public String toString() {
String result = super.toString();
if (decision != null) {
result = result + ", [decision=" + decision.toString() + "]";
}
if (knownValueMap != null) {
// result = result + ", [known=" + knownValueMap.toString() + "]";
StringBuilder buf = new StringBuilder();
buf.append("{");
boolean first = true;
for (Map.Entry<ValueNumber, IsNullValue> entry : knownValueMap.entrySet()) {
if (!first) {
buf.append(", ");
} else {
first = false;
}
buf.append(Strings.trimComma(entry.getKey().toString()));
buf.append("->");
buf.append(Strings.trimComma(entry.getValue().toString()));
}
buf.append("}");
result += ", [known=" + buf.toString() + "]";
}
return result;
}
示例2: toString
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(value != null ? value.toString() : "NoValue,");
buf.append("ifcmp=");
buf.append(ifcmpDecision != null ? Strings.trimComma(ifcmpDecision.toString()) : "INFEASIBLE");
buf.append(",fallthru=");
buf.append(fallThroughDecision != null ? Strings.trimComma(fallThroughDecision.toString()) : "INFEASIBLE");
return buf.toString();
}
示例3: getTextContents
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
public String getTextContents() {
return memoized(Strings.unescapeXml(textBuffer.toString()));
}
示例4: getRequiredAttribute
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
private String getRequiredAttribute(Attributes attributes, String attrName, String elementName) throws SAXException {
String value = attributes.getValue(attrName);
if (value == null)
throw new SAXException(elementName + " element missing " + attrName + " attribute");
return memoized(Strings.unescapeXml(value));
}
示例5: writeText
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
public void writeText(String text) throws IOException {
out.write(Strings.escapeXml(text));
}
示例6: getQuotedAttributeValue
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
/**
* Return a properly quoted form for an attribute value.
*
* @param rawValue
* the raw value of the attribute
* @return a properly quoted representation of the value
*/
public static String getQuotedAttributeValue(@Nonnull String rawValue) {
return Strings.escapeXml(rawValue);
}
示例7: fromRawString
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
public static StringAnnotation fromRawString(String value) {
return new StringAnnotation(Strings.escapeLFCRBackSlash(value));
}
示例8: fromXMLEscapedString
import edu.umd.cs.findbugs.util.Strings; //导入依赖的package包/类
public static StringAnnotation fromXMLEscapedString(String value) {
return new StringAnnotation(Strings.unescapeXml(value));
}