src/main/java/com/mxgraph/io/mxObjectCodec.java
protected void encodeFields(mxCodec enc, Object obj, Node node)
	{
		// LATER: Use PropertyDescriptors in Introspector.getBeanInfo(clazz)
		// see http://forum.jgraph.com/questions/1424
		Class<?> type = obj.getClass();

		while (type != null)
		{
			Field[] fields = type.getDeclaredFields();

			for (int i = 0; i < fields.length; i++)
			{
				Field f = fields[i];

				if ((f.getModifiers() & Modifier.TRANSIENT) != Modifier.TRANSIENT)
				{
					String fieldname = f.getName();
					Object value = getFieldValue(obj, fieldname);
					encodeValue(enc, obj, fieldname, value, node);
				}
			}

			type = type.getSuperclass();
		}
	}
/**
	 * Encodes the declared fields of the given object into the given node.
	 * 
	 * @param enc Codec that controls the encoding process.
	 * @param obj Object whose fields should be encoded.
	 * @param node XML node that contains the encoded object.
	 */
Encodes the declared fields of the given object into the given node.

@param enc Codec that controls the encoding process.
@param obj Object whose fields should be encoded.
@param node XML node that contains the encoded object.
Encodes the declared fields of the given object into the given node . @param enc Codec that controls the encoding process . @param obj Object whose fields should be encoded . @param node XML node that contains the encoded object .
protected void encodeFields(mxCodec enc, Object obj, Node node)
	{
		Class<?> type = obj.getClass();
		while (type != null)
		{
			Field[] fields = type.getDeclaredFields();
			for (int i = 0; i < fields.length; i++)
			{
				Field f = fields[i];
				if ((f.getModifiers() & Modifier.TRANSIENT) != Modifier.TRANSIENT)
				{
					String fieldname = f.getName();
					Object value = getFieldValue(obj, fieldname);
					encodeValue(enc, obj, fieldname, value, node);
				}
			}
			type = type.getSuperclass();
		}
	}
protected void encodeFields ( mxCodec enc , Object obj , Node node ) { Class < ? > type = obj . getClass ( ) ; while ( type != null ) { Field [ ] fields = type . getDeclaredFields ( ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { Field f = fields [ i ] ; if ( ( f . getModifiers ( ) & Modifier . TRANSIENT ) != Modifier . TRANSIENT ) { String fieldname = f . getName ( ) ; Object value = getFieldValue ( obj , fieldname ) ; encodeValue ( enc , obj , fieldname , value , node ) ; } } type = type . getSuperclass ( ) ; } }
Encodes the declared fields of the given object into the given node.
Encodes the declared fields of the given object into the given node .
// LATER: Use PropertyDescriptors in Introspector.getBeanInfo(clazz) // see http://forum.jgraph.com/questions/1424