test_class.file: opendse-io/src/test/java/net/sf/opendse/io/CommonTest.java
test_class.identifier: CommonTest
test_case.body: @Test
  	public void enumToInstance() throws IllegalArgumentException, SecurityException, InstantiationException,
  			IllegalAccessException, InvocationTargetException, NoSuchMethodException {
  		Object o = Common.toInstance("a", E1.class);
  		Assert.assertEquals(E1.a, o);
  		Assert.assertNotEquals(E1.b, o);
  	}
test_case.class_method_signature: CommonTest.enumToInstance()
test_case.full_signature: @Test public void enumToInstance()
test_case.identifier: enumToInstance
test_case.invocations: toInstance assertEquals assertNotEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void enumToInstance()
focal_class.declarator: classMap = new DualHashBidiMap<String, Class<?>>()
focal_class.modifier: public static
focal_class.original_string: public static BidiMap<String, Class<?>> classMap = new DualHashBidiMap<String, Class<?>>();
focal_class.type: BidiMap<String, Class<?>>
focal_class.var_name: classMap
focal_class.declarator: primitives = new HashSet<Class<?>>()
focal_class.modifier: protected static
focal_class.original_string: protected static Set<Class<?>> primitives = new HashSet<Class<?>>();
focal_class.type: Set<Class<?>>
focal_class.var_name: primitives
focal_class.file: opendse-io/src/main/java/net/sf/opendse/io/Common.java
focal_class.identifier: Common
focal_class.class_method_signature: Common.isPrimitive(Class<?> cls)
focal_class.full_signature: protected static boolean isPrimitive(Class<?> cls)
focal_class.identifier: isPrimitive
focal_class.modifiers: protected static
focal_class.parameters: (Class<?> cls)
focal_class.return: boolean
focal_class.signature: boolean isPrimitive(Class<?> cls)
focal_class.class_method_signature: Common.iterable(final nu.xom.Elements elements)
focal_class.full_signature: public static Iterable<nu.xom.Element> iterable(final nu.xom.Elements elements)
focal_class.identifier: iterable
focal_class.modifiers: public static
focal_class.parameters: (final nu.xom.Elements elements)
focal_class.return: Iterable<nu.xom.Element>
focal_class.signature: Iterable<nu.xom.Element> iterable(final nu.xom.Elements elements)
focal_class.class_method_signature: Common.getType(Class<?> clazz)
focal_class.full_signature: protected static String getType(Class<?> clazz)
focal_class.identifier: getType
focal_class.modifiers: protected static
focal_class.parameters: (Class<?> clazz)
focal_class.return: String
focal_class.signature: String getType(Class<?> clazz)
focal_class.class_method_signature: Common.toInstance(String value, Class<?> clazz)
focal_class.full_signature: @SuppressWarnings("rawtypes") protected static Object toInstance(String value, Class<?> clazz)
focal_class.identifier: toInstance
focal_class.modifiers: @SuppressWarnings("rawtypes") protected static
focal_class.parameters: (String value, Class<?> clazz)
focal_class.return: Object
focal_class.signature: Object toInstance(String value, Class<?> clazz)
focal_class.class_method_signature: Common.setAttributes(IAttributes e, Attributes attributes)
focal_class.full_signature: protected static void setAttributes(IAttributes e, Attributes attributes)
focal_class.identifier: setAttributes
focal_class.modifiers: protected static
focal_class.parameters: (IAttributes e, Attributes attributes)
focal_class.return: void
focal_class.signature: void setAttributes(IAttributes e, Attributes attributes)
focal_class.class_method_signature: Common.fromString(String s)
focal_class.full_signature: public static Object fromString(String s)
focal_class.identifier: fromString
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: Object
focal_class.signature: Object fromString(String s)
focal_class.class_method_signature: Common.toString(Serializable o)
focal_class.full_signature: public static String toString(Serializable o)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (Serializable o)
focal_class.return: String
focal_class.signature: String toString(Serializable o)
focal_method.body: @SuppressWarnings("rawtypes")
  	protected static Object toInstance(String value, Class<?> clazz) throws IllegalArgumentException,
  			SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException,
  			NoSuchMethodException {
  		if (!clazz.isEnum()) {
  			Constructor constructor = clazz.getConstructor(String.class);
  			if (constructor != null) {
  				return constructor.newInstance(value.trim());
  			}
  		} else {
  			Class<? extends Enum> eclazz = clazz.asSubclass(Enum.class);
  			for (Enum e : eclazz.getEnumConstants()) {
  				if (e.name().equalsIgnoreCase(value.trim())) {
  					return e;
  				}
  			}
  		}
  		return null;
  	}
focal_method.class_method_signature: Common.toInstance(String value, Class<?> clazz)
focal_method.full_signature: @SuppressWarnings("rawtypes") protected static Object toInstance(String value, Class<?> clazz)
focal_method.identifier: toInstance
focal_method.invocations: isEnum getConstructor newInstance trim asSubclass getEnumConstants equalsIgnoreCase name trim
focal_method.modifiers: @SuppressWarnings("rawtypes") protected static
focal_method.parameters: (String value, Class<?> clazz)
focal_method.return: Object
focal_method.signature: Object toInstance(String value, Class<?> clazz)