< prev index next >

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

Print this page




1775                 return GenerateJLIClassesHelper
1776                         .generateConcreteBMHClassBytes(types);
1777             }
1778 
1779             @Override
1780             public byte[] generateBasicFormsClassBytes(final String className) {
1781                 return GenerateJLIClassesHelper
1782                         .generateBasicFormsClassBytes(className);
1783             }
1784 
1785             @Override
1786             public byte[] generateInvokersHolderClassBytes(final String className,
1787                     MethodType[] invokerMethodTypes,
1788                     MethodType[] callSiteMethodTypes) {
1789                 return GenerateJLIClassesHelper
1790                         .generateInvokersHolderClassBytes(className,
1791                                 invokerMethodTypes, callSiteMethodTypes);
1792             }
1793 
1794             @Override
1795             public VarHandle memoryAddressViewVarHandle(Class<?> carrier, long alignment,
1796                                                         ByteOrder order, long offset, long[] strides) {
1797                 return VarHandles.makeMemoryAddressViewHandle(carrier, alignment, order, offset, strides);
1798             }
1799 
1800             @Override
1801             public Class<?> memoryAddressCarrier(VarHandle handle) {
1802                 return checkMemAccessHandle(handle).carrier();
1803             }
1804 
1805             @Override
1806             public long memoryAddressAlignment(VarHandle handle) {
1807                 return checkMemAccessHandle(handle).alignment + 1;
1808             }
1809 
1810             @Override
1811             public ByteOrder memoryAddressByteOrder(VarHandle handle) {
1812                 return checkMemAccessHandle(handle).be ?
1813                         ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
1814             }
1815 
1816             @Override
1817             public long memoryAddressOffset(VarHandle handle) {
1818                 return checkMemAccessHandle(handle).offset;
1819             }
1820 
1821             @Override
1822             public long[] memoryAddressStrides(VarHandle handle) {
1823                 return checkMemAccessHandle(handle).strides();
1824             }
1825 
1826             private VarHandleMemoryAddressBase checkMemAccessHandle(VarHandle handle) {
1827                 if (!(handle instanceof VarHandleMemoryAddressBase)) {




1775                 return GenerateJLIClassesHelper
1776                         .generateConcreteBMHClassBytes(types);
1777             }
1778 
1779             @Override
1780             public byte[] generateBasicFormsClassBytes(final String className) {
1781                 return GenerateJLIClassesHelper
1782                         .generateBasicFormsClassBytes(className);
1783             }
1784 
1785             @Override
1786             public byte[] generateInvokersHolderClassBytes(final String className,
1787                     MethodType[] invokerMethodTypes,
1788                     MethodType[] callSiteMethodTypes) {
1789                 return GenerateJLIClassesHelper
1790                         .generateInvokersHolderClassBytes(className,
1791                                 invokerMethodTypes, callSiteMethodTypes);
1792             }
1793 
1794             @Override
1795             public VarHandle memoryAddressViewVarHandle(Class<?> carrier, long alignmentMask,
1796                                                         ByteOrder order, long offset, long[] strides) {
1797                 return VarHandles.makeMemoryAddressViewHandle(carrier, alignmentMask, order, offset, strides);
1798             }
1799 
1800             @Override
1801             public Class<?> memoryAddressCarrier(VarHandle handle) {
1802                 return checkMemAccessHandle(handle).carrier();
1803             }
1804 
1805             @Override
1806             public long memoryAddressAlignmentMask(VarHandle handle) {
1807                 return checkMemAccessHandle(handle).alignmentMask;
1808             }
1809 
1810             @Override
1811             public ByteOrder memoryAddressByteOrder(VarHandle handle) {
1812                 return checkMemAccessHandle(handle).be ?
1813                         ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
1814             }
1815 
1816             @Override
1817             public long memoryAddressOffset(VarHandle handle) {
1818                 return checkMemAccessHandle(handle).offset;
1819             }
1820 
1821             @Override
1822             public long[] memoryAddressStrides(VarHandle handle) {
1823                 return checkMemAccessHandle(handle).strides();
1824             }
1825 
1826             private VarHandleMemoryAddressBase checkMemAccessHandle(VarHandle handle) {
1827                 if (!(handle instanceof VarHandleMemoryAddressBase)) {


< prev index next >