src/share/classes/sun/misc/JavaLangAccess.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2006, 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. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2014, 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. Oracle designates this
*** 33,54 ****
public interface JavaLangAccess {
/** Return the constant pool for a class. */
ConstantPool getConstantPool(Class klass);
/**
! * Set the AnnotationType instance corresponding to this class.
* (This method only applies to annotation types.)
*/
! void setAnnotationType(Class klass, AnnotationType annotationType);
/**
* Get the AnnotationType instance corresponding to this class.
* (This method only applies to annotation types.)
*/
AnnotationType getAnnotationType(Class klass);
/**
* Returns the elements of an enum class or null if the
* Class object does not represent an enum type;
* the result is uncloned, cached, and shared by all callers.
*/
<E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
--- 33,60 ----
public interface JavaLangAccess {
/** Return the constant pool for a class. */
ConstantPool getConstantPool(Class klass);
/**
! * Compare-And-Swap the AnnotationType instance corresponding to this class.
* (This method only applies to annotation types.)
*/
! boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
/**
* Get the AnnotationType instance corresponding to this class.
* (This method only applies to annotation types.)
*/
AnnotationType getAnnotationType(Class klass);
/**
+ * Get the array of bytes that is the class-file representation
+ * of this Class' annotations.
+ */
+ byte[] getRawClassAnnotations(Class<?> klass);
+
+ /**
* Returns the elements of an enum class or null if the
* Class object does not represent an enum type;
* the result is uncloned, cached, and shared by all callers.
*/
<E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);