本文整理匯總了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));
}