com.thoughtworks.xstream.io.naming.NoNameCoder Java Examples

The following examples show how to use com.thoughtworks.xstream.io.naming.NoNameCoder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractDriver.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates an AbstractDriver with a NameCoder that does nothing.
 */
public AbstractDriver() {
    this(new NoNameCoder());
}
 
Example #2
Source File: XmlBeanJsonConverUtil.java    From aaden-pay with Apache License 2.0 3 votes vote down vote up
/**
 * 把对象转成XML
 *
 * @param <T>
 * @param obj
 *            要转换的对象
 * @param clss
 *            是转换对象的所有对象的的LIST列表如aa.class
 * @return
 */
public static <T> String beanToXML(Object obj, List<Class<T>> clss) {
	XStream xstream = new XStream(new XppDriver(new NoNameCoder()));
	for (Class<T> cls : clss) {
		xstream.processAnnotations(cls);
	}
	return xmlHeader + xstream.toXML(obj);
}
 
Example #3
Source File: XmlBeanJsonConverUtil.java    From aaden-pay with Apache License 2.0 2 votes vote down vote up
/**
 * 把对象转成XML
 *
 * @param obj
 *            要转换的对象
 * @param rootAlias
 *            要转换的对象的根节点别名,如果为空,默认是类的名字
 * @return
 */
public static String beanToXML(Object obj, String rootAlias) {
	XStream xstream = new XStream(new XppDriver(new NoNameCoder()));
	xstream.processAnnotations(obj.getClass());
	return xmlHeader + xstream.toXML(obj);
}
 
Example #4
Source File: AbstractReader.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates an AbstractReader with a NameCoder that does nothing.
 * 
 * @since 1.4
 */
protected AbstractReader() {
    this(new NoNameCoder());
}
 
Example #5
Source File: AbstractJsonWriter.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct a JSON writer.
 * 
 * @since 1.4
 */
public AbstractJsonWriter() {
    this(new NoNameCoder());
}
 
Example #6
Source File: AbstractJsonWriter.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct a JSON writer with a special mode.
 * 
 * @param mode a bit mask of the mode constants
 * @since 1.4
 */
public AbstractJsonWriter(int mode) {
    this(mode, new NoNameCoder());
}
 
Example #7
Source File: JsonWriter.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new Formatter.
 * 
 * @param lineIndenter the characters used for indenting the line
 * @param newLine the characters used to create a new line
 * @param mode the flags for the format modes
 * @since 1.4
 */
public Format(char[] lineIndenter, char[] newLine, int mode) {
    this(lineIndenter, newLine, mode, new NoNameCoder());
}
 
Example #8
Source File: AbstractWriter.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates an AbstractWriter with a NameCoder that does nothing.
 * 
 * @since 1.4
 */
protected AbstractWriter() {
    this(new NoNameCoder());
}