< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java

Print this page

1534         SharedSecrets.setJavaLangInvokeAccess(new JavaLangInvokeAccess() {
1535             @Override
1536             public Class<?> getDeclaringClass(Object rmname) {
1537                 ResolvedMethodName method = (ResolvedMethodName)rmname;
1538                 return method.declaringClass();
1539             }
1540 
1541             @Override
1542             public MethodType getMethodType(String descriptor, ClassLoader loader) {
1543                 return MethodType.fromDescriptor(descriptor, loader);
1544             }
1545 
1546             public boolean isCallerSensitive(int flags) {
1547                 return (flags & MN_CALLER_SENSITIVE) == MN_CALLER_SENSITIVE;
1548             }
1549 
1550             public boolean isHiddenMember(int flags) {
1551                 return (flags & MN_HIDDEN_MEMBER) == MN_HIDDEN_MEMBER;
1552             }
1553 






1554             @Override
1555             public Map<String, byte[]> generateHolderClasses(Stream<String> traces) {
1556                 return GenerateJLIClassesHelper.generateHolderClasses(traces);
1557             }
1558 
1559             @Override
1560             public VarHandle memorySegmentViewHandle(Class<?> carrier, long alignmentMask, ByteOrder order) {
1561                 return VarHandles.memorySegmentViewHandle(carrier, alignmentMask, order);
1562             }
1563 
1564             @Override
1565             public MethodHandle nativeMethodHandle(NativeEntryPoint nep) {
1566                 return NativeMethodHandle.make(nep);
1567             }
1568 
1569             @Override
1570             public VarHandle filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget) {
1571                 return VarHandles.filterValue(target, filterToTarget, filterFromTarget);
1572             }
1573 

1534         SharedSecrets.setJavaLangInvokeAccess(new JavaLangInvokeAccess() {
1535             @Override
1536             public Class<?> getDeclaringClass(Object rmname) {
1537                 ResolvedMethodName method = (ResolvedMethodName)rmname;
1538                 return method.declaringClass();
1539             }
1540 
1541             @Override
1542             public MethodType getMethodType(String descriptor, ClassLoader loader) {
1543                 return MethodType.fromDescriptor(descriptor, loader);
1544             }
1545 
1546             public boolean isCallerSensitive(int flags) {
1547                 return (flags & MN_CALLER_SENSITIVE) == MN_CALLER_SENSITIVE;
1548             }
1549 
1550             public boolean isHiddenMember(int flags) {
1551                 return (flags & MN_HIDDEN_MEMBER) == MN_HIDDEN_MEMBER;
1552             }
1553 
1554             public boolean isNullRestrictedField(MethodHandle mh) {
1555                 var memberName = mh.internalMemberName();
1556                 assert memberName.isField();
1557                 return memberName.isNullRestricted();
1558             }
1559 
1560             @Override
1561             public Map<String, byte[]> generateHolderClasses(Stream<String> traces) {
1562                 return GenerateJLIClassesHelper.generateHolderClasses(traces);
1563             }
1564 
1565             @Override
1566             public VarHandle memorySegmentViewHandle(Class<?> carrier, long alignmentMask, ByteOrder order) {
1567                 return VarHandles.memorySegmentViewHandle(carrier, alignmentMask, order);
1568             }
1569 
1570             @Override
1571             public MethodHandle nativeMethodHandle(NativeEntryPoint nep) {
1572                 return NativeMethodHandle.make(nep);
1573             }
1574 
1575             @Override
1576             public VarHandle filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget) {
1577                 return VarHandles.filterValue(target, filterToTarget, filterFromTarget);
1578             }
1579 
< prev index next >