Skip to content

io microsphere internal reflect ConstantPoolUtils

github-actions[bot] edited this page Jul 30, 2026 · 1 revision

ConstantPoolUtils

Type: Class | Module: microsphere-java-core | Package: io.microsphere.internal.reflect | Since: 1.0.0

Source: microsphere-java-core/src/main/java/io/microsphere/internal/reflect/ConstantPoolUtils.java

Overview

The utility class for sun.reflect.ConstantPool or jdk.internal.reflect.ConstantPool(JDK 9+

Declaration

public abstract class ConstantPoolUtils implements Utils

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.3.16-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 8 ✅ Compatible
Java 11 ✅ Compatible
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-java-core</artifactId>
    <version>${microsphere-java.version}</version>
</dependency>

Tip: Use the BOM (microsphere-java-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.internal.reflect.ConstantPoolUtils;

API Reference

Public Methods

Method Description
getClassRefIndexAt The class name of sun.reflect.ConstantPool
getMethodAt
getMethodAtIfLoaded
getFieldAt
getFieldAtIfLoaded
getMemberRefInfoAt
getNameAndTypeRefIndexAt
getNameAndTypeRefInfoAt
getIntAt
getLongAt
getFloatAt
getDoubleAt
getStringAt
getUTF8At

Method Details

getClassRefIndexAt

public static Integer getClassRefIndexAt(Class<?> targetClass, int index)

The class name of sun.reflect.ConstantPool / public static final String LEGACY_CONSTANT_POOL_CLASS_NAME = "sun.reflect.ConstantPool";

/** The class name of jdk.internal.reflect.ConstantPool / public static final String CONSTANT_POOL_CLASS_NAME = "jdk.internal.reflect.ConstantPool";

/** The Class of sun.reflect.ConstantPool or jdk.internal.reflect.ConstantPool /

See Also

  • sun.reflect.ConstantPool
  • jdk.internal.reflect.ConstantPool

This documentation was auto-generated from the source code of microsphere-java.

Home

annotation-processor

annotation-test

java-annotations

java-core

java-test

jdk-tools

lang-model

Clone this wiki locally