/** Returns class name of value object.*/ final String getClassName() { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr) ((ModifiedAttribute) obj).getValue()).getValue(); } return (modifObj != null) ? modifObj.getClass().getName() : obj.getClass().getName(); } return null; }
final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr) ((ModifiedAttribute) obj).getValue()).getValue(); if (distinguishObject(modifObj) != Attr.isValid("SERIALVALUE")) { //NOI18N return; } } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString() : obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr)((ModifiedAttribute)obj).getValue ()).getValue (); if (distinguishObject (modifObj) != Attr.isValid("SERIALVALUE")) //NOI18N return; } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString():obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr)((ModifiedAttribute)obj).getValue ()).getValue (); if (distinguishObject (modifObj) != Attr.isValid("SERIALVALUE")) //NOI18N return; } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString():obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
final String getValueForPrint() { if (obj != null) { Attr modifAttr = null; if (obj instanceof ModifiedAttribute) modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); return (modifAttr != null) ? encode(modifAttr.getValue ()) : encode(getValue ()); } return (value != null)?encode(value) : ""; // NOI18N }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
final String getValueForPrint() { if (obj != null) { Attr modifAttr = null; if (obj instanceof ModifiedAttribute) modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); return (modifAttr != null) ? encode(modifAttr.getValue ()) : encode(getValue ()); } return (value != null)?encode(value) : ""; // NOI18N }
/** * @return value in textual format or "" if internal error. */ final String getValue() { if (obj != null) getValue(obj); return (value != null)?value : ""; // NOI18N }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
/** * @return value in textual format or "" if internal error. */ final String getValue() { if (obj != null) getValue(obj); return (value != null)?value : ""; // NOI18N }
final String getKeyForPrint() { if ((obj != null) && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr) ((ModifiedAttribute) obj).getValue(); int keyIdx = Attr.isValid("SERIALVALUE"); //NOI18N if (modifAttr != null) { keyIdx = distinguishObject(modifAttr.getValue()); } String[] keyArray = getAttrTypes(); return keyArray[keyIdx]; } return getKey(); }
final String getValueForPrint() { if (obj != null) { Attr modifAttr = null; if (obj instanceof ModifiedAttribute) { modifAttr = (Attr) ((ModifiedAttribute) obj).getValue(); } return (modifAttr != null) ? encode(modifAttr.getValue()) : encode(getValue()); } return (value != null) ? encode(value) : ""; // NOI18N }
/** * @return value in textual format or "" if internal error. */ final String getValue() { if (obj != null) { getValue(obj); } return (value != null) ? value : ""; // NOI18N }