package com.github.to2mbn.jmccc.version;

import java.util.Objects;
import java.util.Set;

public class Native extends Library {

    private String natives;
    private Set<String> extractExcludes;

    /**
     * Creates a native.
     * 
     * @param domain the domain of the native
     * @param name the name of the native
     * @param version the version of the native
     * @param natives the arch of the native
     * @param extractExcludes the extract excludes list of the native, null if no excludes
     * @throws NullPointerException if <code>domain==null||name==null||version==null||natives==null</code>
     */
    public Native(String domain, String name, String version, String natives, Set<String> extractExcludes) {
        super(domain, name, version);
        Objects.requireNonNull(natives);
        this.natives = natives;
        this.extractExcludes = extractExcludes;
    }

    /**
     * Gets the arch of the native
     * 
     * @return the arch of the native
     */
    public String getNatives() {
        return natives;
    }

    /**
     * Gets the extract excludes list of the native, null if no excludes.
     * 
     * @return the extract excludes list of the native, null if no excludes
     */
    public Set<String> getExtractExcludes() {
        return extractExcludes;
    }

    @Override
    public String toString() {
        return super.toString() + "@" + natives;
    }

    @Override
    protected String generatePath() {
        return getDomain().replace('.', '/') + "/" + getName() + "/" + getVersion() + "/" + getName() + "-" + getVersion() + "-" + natives + ".jar";
    }
}

@@ -142,23 +142,20 @@
  String 
-natives
+arch
 ;%0A    pr
@@ -381,23 +381,20 @@
  @param 
-natives
+arch
  the arc
@@ -586,23 +586,20 @@
 ==null%7C%7C
-natives
+arch
 ==null%3C/
@@ -681,23 +681,20 @@
  String 
-natives
+arch
 , Set%3CSt
@@ -787,23 +787,20 @@
 NonNull(
-natives
+arch
 );%0A     
@@ -811,25 +811,19 @@
 his.
-natives = natives
+arch = arch
 ;%0A  
@@ -997,15 +997,12 @@
  get
-Natives
+Arch
 () %7B
@@ -1017,23 +1017,20 @@
  return 
-natives
+arch
 ;%0A    %7D%0A
@@ -1374,23 +1374,20 @@
 + %22@%22 + 
-natives
+arch
 ;%0A    %7D%0A
@@ -1574,15 +1574,12 @@
 %22 + 
-natives
+arch
  + %22

rename natives to arch