jdk/src/java.base/share/native/libjava/ConstantPool.c
author chegar
Fri, 15 Apr 2016 16:19:15 +0100
changeset 37363 329dba26ffd2
parent 35629 5738b816718a
permissions -rw-r--r--
8137058: Clear out all non-Critical APIs from sun.reflect Reviewed-by: alanb, jfranck, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
     2
 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#include "jvm.h"
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    27
#include "jdk_internal_reflect_ConstantPool.h"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    29
JNIEXPORT jint JNICALL Java_jdk_internal_reflect_ConstantPool_getSize0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
(JNIEnv *env, jobject unused, jobject jcpool)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
  return JVM_ConstantPoolGetSize(env, unused, jcpool);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    35
JNIEXPORT jclass JNICALL Java_jdk_internal_reflect_ConstantPool_getClassAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  return JVM_ConstantPoolGetClassAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    41
JNIEXPORT jclass JNICALL Java_jdk_internal_reflect_ConstantPool_getClassAtIfLoaded0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  return JVM_ConstantPoolGetClassAtIfLoaded(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    47
JNIEXPORT jint JNICALL Java_jdk_internal_reflect_ConstantPool_getClassRefIndexAt0
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    48
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    49
{
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    50
    return JVM_ConstantPoolGetClassRefIndexAt(env, unused, jcpool, index);
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    51
}
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    52
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    53
JNIEXPORT jobject JNICALL Java_jdk_internal_reflect_ConstantPool_getMethodAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
  return JVM_ConstantPoolGetMethodAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    59
JNIEXPORT jobject JNICALL Java_jdk_internal_reflect_ConstantPool_getMethodAtIfLoaded0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  return JVM_ConstantPoolGetMethodAtIfLoaded(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    65
JNIEXPORT jobject JNICALL Java_jdk_internal_reflect_ConstantPool_getFieldAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
  return JVM_ConstantPoolGetFieldAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    71
JNIEXPORT jobject JNICALL Java_jdk_internal_reflect_ConstantPool_getFieldAtIfLoaded0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  return JVM_ConstantPoolGetFieldAtIfLoaded(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    77
JNIEXPORT jobjectArray JNICALL Java_jdk_internal_reflect_ConstantPool_getMemberRefInfoAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  return JVM_ConstantPoolGetMemberRefInfoAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    83
JNIEXPORT jint JNICALL Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefIndexAt0
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    84
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    85
{
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    86
    return JVM_ConstantPoolGetNameAndTypeRefIndexAt(env, unused, jcpool, index);
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    87
}
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    88
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    89
JNIEXPORT jobjectArray JNICALL Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefInfoAt0
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    90
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    91
{
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    92
  return JVM_ConstantPoolGetNameAndTypeRefInfoAt(env, unused, jcpool, index);
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    93
}
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
    94
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
    95
JNIEXPORT jint JNICALL Java_jdk_internal_reflect_ConstantPool_getIntAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
  return JVM_ConstantPoolGetIntAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   101
JNIEXPORT jlong JNICALL Java_jdk_internal_reflect_ConstantPool_getLongAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  return JVM_ConstantPoolGetLongAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   107
JNIEXPORT jfloat JNICALL Java_jdk_internal_reflect_ConstantPool_getFloatAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  return JVM_ConstantPoolGetFloatAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   113
JNIEXPORT jdouble JNICALL Java_jdk_internal_reflect_ConstantPool_getDoubleAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  return JVM_ConstantPoolGetDoubleAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   119
JNIEXPORT jstring JNICALL Java_jdk_internal_reflect_ConstantPool_getStringAt0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
  return JVM_ConstantPoolGetStringAt(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   125
JNIEXPORT jstring JNICALL Java_jdk_internal_reflect_ConstantPool_getUTF8At0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
  return JVM_ConstantPoolGetUTF8At(env, unused, jcpool, index);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
}
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   130
37363
329dba26ffd2 8137058: Clear out all non-Critical APIs from sun.reflect
chegar
parents: 35629
diff changeset
   131
JNIEXPORT jbyte JNICALL Java_jdk_internal_reflect_ConstantPool_getTagAt0
35629
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   132
(JNIEnv *env, jobject unused, jobject jcpool, jint index)
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   133
{
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   134
  return JVM_ConstantPoolGetTagAt(env, unused, jcpool, index);
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   135
}
5738b816718a 8141615: Add new public methods to sun.reflect.ConstantPool
kshefov
parents: 25859
diff changeset
   136