src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta

src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java

Print this page




  80      * Converts the given {@link JavaKind#Object object} constant to a {@link JavaKind#isPrimitive()
  81      * primitive} constant, according to the Java unboxing rules. Returns {@code null} if the source
  82      * is is not an object constant that can be unboxed, or the unboxed value is not available at
  83      * this point.
  84      */
  85     JavaConstant unboxPrimitive(JavaConstant source);
  86 
  87     /**
  88      * Gets a string as a {@link JavaConstant}.
  89      */
  90     JavaConstant forString(String value);
  91 
  92     /**
  93      * Returns the {@link ResolvedJavaType} for a {@link Class} object (or any other object regarded
  94      * as a class by the VM) encapsulated in the given constant. Returns {@code null} if the
  95      * constant does not encapsulate a class, or if the type is not available at this point.
  96      */
  97     ResolvedJavaType asJavaType(Constant constant);
  98 
  99     /**
 100      * Check if the constant is embeddable in the code.
 101      *
 102      * @param constant the constant to test
 103      */
 104     default boolean isEmbeddable(Constant constant) {
 105         return true;
 106     }
 107 
 108     /**
 109      * Gets access to the internals of {@link MethodHandle}.
 110      */
 111     MethodHandleAccessProvider getMethodHandleAccess();
 112 
 113     /**
 114      * Gets raw memory access.
 115      */
 116     MemoryAccessProvider getMemoryAccessProvider();
 117 
 118     /**
 119      * Gets the runtime representation of the {@link Class} object of this type.
 120      */
 121     JavaConstant asJavaClass(ResolvedJavaType type);
 122 
 123     /**
 124      * Gets the runtime representation of the "hub" of this type--that is, the closest part of the
 125      * type representation which is typically stored in the object header.
 126      */
 127     Constant asObjectHub(ResolvedJavaType type);
 128 }


  80      * Converts the given {@link JavaKind#Object object} constant to a {@link JavaKind#isPrimitive()
  81      * primitive} constant, according to the Java unboxing rules. Returns {@code null} if the source
  82      * is is not an object constant that can be unboxed, or the unboxed value is not available at
  83      * this point.
  84      */
  85     JavaConstant unboxPrimitive(JavaConstant source);
  86 
  87     /**
  88      * Gets a string as a {@link JavaConstant}.
  89      */
  90     JavaConstant forString(String value);
  91 
  92     /**
  93      * Returns the {@link ResolvedJavaType} for a {@link Class} object (or any other object regarded
  94      * as a class by the VM) encapsulated in the given constant. Returns {@code null} if the
  95      * constant does not encapsulate a class, or if the type is not available at this point.
  96      */
  97     ResolvedJavaType asJavaType(Constant constant);
  98 
  99     /**









 100      * Gets access to the internals of {@link MethodHandle}.
 101      */
 102     MethodHandleAccessProvider getMethodHandleAccess();
 103 
 104     /**
 105      * Gets raw memory access.
 106      */
 107     MemoryAccessProvider getMemoryAccessProvider();
 108 
 109     /**
 110      * Gets the runtime representation of the {@link Class} object of this type.
 111      */
 112     JavaConstant asJavaClass(ResolvedJavaType type);
 113 
 114     /**
 115      * Gets the runtime representation of the "hub" of this type--that is, the closest part of the
 116      * type representation which is typically stored in the object header.
 117      */
 118     Constant asObjectHub(ResolvedJavaType type);
 119 }
src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File