1 2 12 package com.versant.core.util.classhelper.jdk12; 13 14 public class ClassHelperImpl 15 extends com.versant.core.util.classhelper.ClassHelper { 16 17 public Class classForName(String clazz, boolean validate, 18 ClassLoader loader) throws ClassNotFoundException 19 { 20 return Class.forName(clazz, validate, loader); 21 } 22 23 public ClassLoader getContextClassLoader(Thread thread) 24 { 25 return thread.getContextClassLoader(); 26 } 27 public ClassLoader getSystemClassLoader() 28 { 29 return ClassLoader.getSystemClassLoader(); 30 } 31 32 public void setAccessible(java.lang.reflect.Field field, boolean value) 33 { 34 field.setAccessible(value); 35 } 36 37 public void setAccessible(java.lang.reflect.Constructor ctor, boolean value) 38 { 39 ctor.setAccessible(value); 40 } 41 42 public Object getFieldValue(java.lang.reflect.Field field, Object obj) 43 throws IllegalAccessException 44 { 45 return field.get(obj); 46 } 47 } 48 | Popular Tags |