< prev index next >

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

Print this page

1546         SharedSecrets.setJavaLangInvokeAccess(new JavaLangInvokeAccess() {
1547             @Override
1548             public Class<?> getDeclaringClass(Object rmname) {
1549                 ResolvedMethodName method = (ResolvedMethodName)rmname;
1550                 return method.declaringClass();
1551             }
1552 
1553             @Override
1554             public MethodType getMethodType(String descriptor, ClassLoader loader) {
1555                 return MethodType.fromDescriptor(descriptor, loader);
1556             }
1557 
1558             public boolean isCallerSensitive(int flags) {
1559                 return (flags & MN_CALLER_SENSITIVE) == MN_CALLER_SENSITIVE;
1560             }
1561 
1562             public boolean isHiddenMember(int flags) {
1563                 return (flags & MN_HIDDEN_MEMBER) == MN_HIDDEN_MEMBER;
1564             }
1565 






1566             @Override
1567             public Map<String, byte[]> generateHolderClasses(Stream<String> traces) {
1568                 return GenerateJLIClassesHelper.generateHolderClasses(traces);
1569             }
1570 
1571             @Override
1572             public VarHandle memorySegmentViewHandle(Class<?> carrier, long alignmentMask, ByteOrder order) {
1573                 return VarHandles.memorySegmentViewHandle(carrier, alignmentMask, order);
1574             }
1575 
1576             @Override
1577             public MethodHandle nativeMethodHandle(NativeEntryPoint nep) {
1578                 return NativeMethodHandle.make(nep);
1579             }
1580 
1581             @Override
1582             public VarHandle filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget) {
1583                 return VarHandles.filterValue(target, filterToTarget, filterFromTarget);
1584             }
1585 

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