< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageLocationWriter.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2014, 2017, 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.  Oracle designates this
--- 1,7 ---
  /*
!  * Copyright (c) 2014, 2025, 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.  Oracle designates this

*** 51,13 ***
  
      private ImageLocationWriter addAttribute(int kind, String value) {
          return addAttribute(kind, strings.add(value));
      }
  
!     static ImageLocationWriter newLocation(String fullName,
              ImageStringsWriter strings,
!             long contentOffset, long compressedSize, long uncompressedSize) {
          String moduleName = "";
          String parentName = "";
          String baseName;
          String extensionName = "";
  
--- 51,17 ---
  
      private ImageLocationWriter addAttribute(int kind, String value) {
          return addAttribute(kind, strings.add(value));
      }
  
!     static ImageLocationWriter newLocation(
+             String fullName,
              ImageStringsWriter strings,
!             long contentOffset,
+             long compressedSize,
+             long uncompressedSize,
+             int previewFlags) {
          String moduleName = "";
          String parentName = "";
          String baseName;
          String extensionName = "";
  

*** 88,17 ***
                  baseName = fullName;
              }
          }
  
          return new ImageLocationWriter(strings)
!                .addAttribute(ATTRIBUTE_MODULE, moduleName)
!                .addAttribute(ATTRIBUTE_PARENT, parentName)
!                .addAttribute(ATTRIBUTE_BASE, baseName)
!                .addAttribute(ATTRIBUTE_EXTENSION, extensionName)
!                .addAttribute(ATTRIBUTE_OFFSET, contentOffset)
!                .addAttribute(ATTRIBUTE_COMPRESSED, compressedSize)
!                .addAttribute(ATTRIBUTE_UNCOMPRESSED, uncompressedSize);
      }
  
      @Override
      public int hashCode() {
          return hashCode(ImageStringsReader.HASH_MULTIPLIER);
--- 92,18 ---
                  baseName = fullName;
              }
          }
  
          return new ImageLocationWriter(strings)
!                 .addAttribute(ATTRIBUTE_MODULE, moduleName)
!                 .addAttribute(ATTRIBUTE_PARENT, parentName)
!                 .addAttribute(ATTRIBUTE_BASE, baseName)
!                 .addAttribute(ATTRIBUTE_EXTENSION, extensionName)
!                 .addAttribute(ATTRIBUTE_OFFSET, contentOffset)
!                 .addAttribute(ATTRIBUTE_COMPRESSED, compressedSize)
!                 .addAttribute(ATTRIBUTE_UNCOMPRESSED, uncompressedSize)
+                 .addAttribute(ATTRIBUTE_PREVIEW_FLAGS, previewFlags);
      }
  
      @Override
      public int hashCode() {
          return hashCode(ImageStringsReader.HASH_MULTIPLIER);
< prev index next >