< prev index next >

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

Print this page

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






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

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