< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMObjectFactory.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 43,60 ****
were desired (though the current system is designed to not require
one.) </P>
*/
public class VMObjectFactory {
! public static Object newObject(Class clazz, Address addr)
throws ConstructionException {
try {
if (addr == null) {
return null;
}
! Constructor c = clazz.getConstructor(new Class[] {
Address.class
});
return c.newInstance(new Object[] { addr });
}
catch (java.lang.reflect.InvocationTargetException ite) {
--- 43,60 ----
were desired (though the current system is designed to not require
one.) </P>
*/
public class VMObjectFactory {
! public static <T> T newObject(Class<T> clazz, Address addr)
throws ConstructionException {
try {
if (addr == null) {
return null;
}
! Constructor<T> c = clazz.getConstructor(new Class[] {
Address.class
});
return c.newInstance(new Object[] { addr });
}
catch (java.lang.reflect.InvocationTargetException ite) {
< prev index next >