01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.util.classhelper.jdk12;
12:
13: public class ClassHelperImpl extends
14: com.versant.core.util.classhelper.ClassHelper {
15:
16: public Class classForName(String clazz, boolean validate,
17: ClassLoader loader) throws ClassNotFoundException {
18: return Class.forName(clazz, validate, loader);
19: }
20:
21: public ClassLoader getContextClassLoader(Thread thread) {
22: return thread.getContextClassLoader();
23: }
24:
25: public ClassLoader getSystemClassLoader() {
26: return ClassLoader.getSystemClassLoader();
27: }
28:
29: public void setAccessible(java.lang.reflect.Field field,
30: boolean value) {
31: field.setAccessible(value);
32: }
33:
34: public void setAccessible(java.lang.reflect.Constructor ctor,
35: boolean value) {
36: ctor.setAccessible(value);
37: }
38:
39: public Object getFieldValue(java.lang.reflect.Field field,
40: Object obj) throws IllegalAccessException {
41: return field.get(obj);
42: }
43: }
|