All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.finos.symphony.toolkit.quickfix.ReflectionHelpers Maven / Gradle / Ivy

The newest version!
package org.finos.symphony.toolkit.quickfix;

import java.lang.reflect.Field;

import quickfix.FieldMap;

public class ReflectionHelpers {


	private static Field fieldOrder;
	
	static {
		try {
			fieldOrder = FieldMap.class.getDeclaredField("fieldOrder");
			fieldOrder.setAccessible(true);
		} catch (Exception e) {
			throw new UnsupportedOperationException("Couldn't initialize Reflection", e);
		}
	}
	
	public static void setFieldOrder(FieldMap fm, int[] fo) {
		try {
			fieldOrder.set(fm, fo);
		} catch (Exception e) {
			throw new UnsupportedOperationException("Couldn't set fieldOrder", e);
		}
	}
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy