< prev index next >

src/java.base/share/classes/jdk/internal/foreign/abi/ArgumentBinding.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 22,60 **** */ package jdk.internal.foreign.abi; public class ArgumentBinding { private final Storage storage; ! private final Argument member; private final long offset; ! public ArgumentBinding(Storage storage, Argument member, long offset) { this.storage = storage; ! this.member = member; this.offset = offset; } ! public ArgumentBinding(Storage storage, Argument member) { ! this(storage, member, 0); } ! public Storage getStorage() { return storage; } ! public Argument getMember() { ! return member; } ! public long getOffset() { return offset; } @Override public String toString() { StringBuilder sb = new StringBuilder(); ! ! sb.append(storage).append(" : ").append(member.getName()).append(" @ 0x").append(Long.toHexString(offset)); ! return sb.toString(); } } --- 22,62 ---- */ package jdk.internal.foreign.abi; public class ArgumentBinding { private final Storage storage; ! private final Argument argument; private final long offset; ! public ArgumentBinding(Storage storage, Argument argument, long offset) { this.storage = storage; ! this.argument = argument; this.offset = offset; } ! public ArgumentBinding(Storage storage, Argument argument) { ! this(storage, argument, 0); } ! public Storage storage() { return storage; } ! public Argument argument() { ! return argument; } ! public long offset() { return offset; } @Override public String toString() { StringBuilder sb = new StringBuilder(); ! sb.append(storage) ! .append(" : ") ! .append(argument.name()) ! .append(" @ 0x") ! .append(Long.toHexString(offset)); return sb.toString(); } }
< prev index next >