You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/07/20 13:52:16 UTC
cvs commit: ws-axis/java/src/org/apache/axis/wsdl/symbolTable BackslashUtil.java
dims 2005/07/20 04:52:16
Modified: java/src/org/apache/axis/wsdl/symbolTable BackslashUtil.java
Log:
javadoc fixes for AXIS-2088 from Dennis Byrne
Revision Changes Path
1.2 +26 -2 ws-axis/java/src/org/apache/axis/wsdl/symbolTable/BackslashUtil.java
Index: BackslashUtil.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/BackslashUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BackslashUtil.java 7 Jul 2005 13:15:28 -0000 1.1
+++ BackslashUtil.java 20 Jul 2005 11:52:16 -0000 1.2
@@ -20,10 +20,17 @@
/**
* @author dbyrne
*
- * this method exists because backslashes cannot be removed unless
+ * Created in response to AXIS-2088. This class exposes a handful of static utility
+ * methods that are used to manipulate backslash chars w/in the context of QName objects.
+ *
*/
public class BackslashUtil implements java.io.Serializable {
+ /**
+ * @param QName[local] that may contain unescaped backslashes
+ * @return QName[local] w/ no backslashes
+ */
+
public static QName getQNameWithBackslashlessLocal(QName suspectQName) {
String trustedString = null;
@@ -32,6 +39,11 @@
return getQNameWithDifferentLocal(suspectQName, trustedString);
}
+ /**
+ * @param QName[local] which may contain unescaped backslashes
+ * @return QName[local] w/ escaped backslashes
+ */
+
public static QName getQNameWithBackslashedLocal(QName suspectQName) {
String trustedString = null;
@@ -40,23 +52,35 @@
return getQNameWithDifferentLocal(suspectQName, trustedString);
}
+ /**
+ * Creates a copy of the supplied QName w/ the supplied local name
+ */
public static QName getQNameWithDifferentLocal(QName qName, String localName) {
QName trustedQName = null;
// recreate the QName, only w/ a local name we can trust.
trustedQName = new QName(qName.getNamespaceURI(), localName, qName.getPrefix());
-
return trustedQName;
}
+ /**
+ * Slave method for getQNameWithBackslashedLocal()
+ */
public static String applyBackslashes(String string) {
return transformBackslashes(string, false);
}
+ /**
+ * Slave method for getQNameWithBackslashlessLocal
+ */
public static String stripBackslashes(String string) {
return transformBackslashes(string, true);
}
+ /**
+ * Slave method for applyBackslashes & stripBackslashes .
+ *
+ */
public static String transformBackslashes(String string, boolean delete) {
byte[] suspectBytes = null;
StringBuffer stringBuffer = null;