From 52f613b00d1b73d3fb1bc8416174539271305fd6 Mon Sep 17 00:00:00 2001 From: yangzhi Date: Tue, 20 Jun 2023 17:50:35 +0800 Subject: [PATCH] Remove lombok dependency --- app/build.gradle | 2 - .../assets/apk/System.Diagnostics.Debug.dll | Bin 0 -> 24392 bytes .../zane/smapiinstaller/MainApplication.java | 19 +- .../dto/AppUpdateCheckResultDto.java | 78 +++- .../dto/AssemblyStoreAssembly.java | 128 ++++++- .../dto/GoogleTranslationDto.java | 160 +++++++- .../smapiinstaller/dto/JsonEditorObject.java | 18 +- .../dto/KeyboardEditorObject.java | 19 +- .../dto/ModUpdateCheckRequestDto.java | 355 ++++++++++++++++-- .../dto/ModUpdateCheckResponseDto.java | 296 ++++++++++++++- .../com/zane/smapiinstaller/dto/Tuple2.java | 72 +++- .../dto/YouDaoTranslationDto.java | 159 +++++++- .../entity/ApkFilesManifest.java | 136 ++++++- .../entity/DownloadableContent.java | 164 +++++++- .../entity/DownloadableContentList.java | 62 ++- .../entity/FrameworkConfig.java | 171 ++++++++- .../zane/smapiinstaller/entity/HelpItem.java | 101 ++++- .../smapiinstaller/entity/HelpItemList.java | 64 +++- .../smapiinstaller/entity/ManifestEntry.java | 235 +++++++++++- .../entity/ModManifestEntry.java | 329 +++++++++++++++- .../smapiinstaller/entity/UpdatableList.java | 56 ++- .../logic/ManifestTagVisitor.java | 41 +- .../utils/MultiprocessingUtil.java | 107 +++++- .../zane/smapiinstaller/utils/ZipUtils.java | 105 ++++-- 24 files changed, 2708 insertions(+), 169 deletions(-) create mode 100644 app/src/main/assets/apk/System.Diagnostics.Debug.dll diff --git a/app/build.gradle b/app/build.gradle index f52f6ec..6651c13 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -112,7 +112,5 @@ dependencies { implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" - compileOnly 'org.projectlombok:lombok:1.18.16' - annotationProcessor 'org.projectlombok:lombok:1.18.16' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' } diff --git a/app/src/main/assets/apk/System.Diagnostics.Debug.dll b/app/src/main/assets/apk/System.Diagnostics.Debug.dll new file mode 100644 index 0000000000000000000000000000000000000000..73f04e7ae22da7e7823ad05cae5a636d308914dc GIT binary patch literal 24392 zcmeHu2|QKZ*Z;ZKHP2H?hHJ`vool9yNn{?PM8=D2?z$8rQ=|+TBN8$sLWV?UX;vsD zrA!r-BpE97-}jc%^Yr|N_kDk#=Xu}%bL#GM_O#C4Yp=c6THmu6*&K%`AP7Q%-+-kv821L52tlNUqA%Y4vTxkRX~K0YeZCC?Wm8^=cDH(BP*D zeh|b$enx&BH>rR$e)1I#Qcxau6aw?oJWOgz`v2qpElVl_S04c?9+_!FE#A$e?? z;DOYh4*b?!nqc%80?x}9G$fDJ0aTJ`k>?HW-!4rE(q4UDz27GB6g#~J7s%U^`f7XmI)Oat0^JeR9ALdk znNJ8gXdNg3kEHRh-dCSN+i&w4Mv&@A%sdF8kW>&of|QDp(^PV*OHS>{sRX&rb#nR~ zq@^sl2a9sQbAheXMJ*tf#{)n2m`T`(~aa*2CmfPzr;B!WsuuRm<1gY$PL;QdIgeotQq=js^XMbz@bJNo~=)|3F4 z=}i26#a3UxAOhaaeNENsOmy)6eqN42zv|=d=jgMhVzq~5kRJ}b>A;#Qiy(g@&KskH zcXadd^(W$;{W0X$&>vM`T)e!#Rj#%%$GLjpoJrIEzM>GundnPcZLo$qILNFrasu#YJ>c6TzDQN47Nl#1f@Y>gOfHZ$eUYe zVM+Uhv|*`xKUrU?c=YZJCi)z6#WLgM#Inbmq}b0CfnHIDSt)$gn_r%M)c>S?=wzQF zy8!YyJz>ko@bp7hM)tELU8UY{B0eF@l=6!5&G>{sTha8yjEk)yLuz|jmYAKB)H$3K z@23Z9L_1&U=QCk@E19oksBPjo%C;59h4yYsl{d2KOXWpCTz|wW2;xRSoJM$Og0H`? zD-pfbm*D41AWIPh@gpGa?^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W7cJG`;pW&2K_&R{Q= ztYx~jVafh(hp?i9!pvNr`2LBgXgc)zfq_>Xm(?!gpPTg@L{zu#5G`!;i|ca3#2;J8 zdTcd6d9JyPQwej9qi|EIwJ4!0SBhTZ;;W7D(>~Qt!b6cACf3qlf_1;RI9f^sD`-6o zQnq3!%zTNoxjI$dv$Pl)6clLOtZK?%uu!lmuPLk>eUH-V2&=z4^^@t^ltv2Mqx3sZ z?Kk|i|8Vj!zCZNF3$g5)mIj^vb1WzCil?TeZ;Sox5hHr$h{Z;2;f3Uh*ZX93y0}UR zJI*dSm-Weqv)EQu&5ib+ye`L<#~~?tUi`ShbiFvmRrW0ttjcq!0Ef-^^z?mq6A}?8 zZ)vjELq`e|YsB9Md{$xn+ + @SuppressWarnings("all") + public DaoSession getDaoSession() { + return this.daoSession; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/AppUpdateCheckResultDto.java b/app/src/main/java/com/zane/smapiinstaller/dto/AppUpdateCheckResultDto.java index b4c2a0b..e4ae7ac 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/AppUpdateCheckResultDto.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/AppUpdateCheckResultDto.java @@ -1,11 +1,8 @@ package com.zane.smapiinstaller.dto; -import lombok.Data; - /** * @author Zane */ -@Data public class AppUpdateCheckResultDto { /** * 版本号 @@ -15,4 +12,79 @@ public class AppUpdateCheckResultDto { * 版本名称 */ private String versionName; + + // + @SuppressWarnings("all") + public AppUpdateCheckResultDto() { + } + + /** + * 版本号 + */ + @SuppressWarnings("all") + public long getVersionCode() { + return this.versionCode; + } + + /** + * 版本名称 + */ + @SuppressWarnings("all") + public String getVersionName() { + return this.versionName; + } + + /** + * 版本号 + */ + @SuppressWarnings("all") + public void setVersionCode(final long versionCode) { + this.versionCode = versionCode; + } + + /** + * 版本名称 + */ + @SuppressWarnings("all") + public void setVersionName(final String versionName) { + this.versionName = versionName; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof AppUpdateCheckResultDto)) return false; + final AppUpdateCheckResultDto other = (AppUpdateCheckResultDto) o; + if (!other.canEqual((Object) this)) return false; + if (this.getVersionCode() != other.getVersionCode()) return false; + final Object this$versionName = this.getVersionName(); + final Object other$versionName = other.getVersionName(); + if (this$versionName == null ? other$versionName != null : !this$versionName.equals(other$versionName)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof AppUpdateCheckResultDto; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final long $versionCode = this.getVersionCode(); + result = result * PRIME + (int) ($versionCode >>> 32 ^ $versionCode); + final Object $versionName = this.getVersionName(); + result = result * PRIME + ($versionName == null ? 43 : $versionName.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "AppUpdateCheckResultDto(versionCode=" + this.getVersionCode() + ", versionName=" + this.getVersionName() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/AssemblyStoreAssembly.java b/app/src/main/java/com/zane/smapiinstaller/dto/AssemblyStoreAssembly.java index ad506b8..54d92a5 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/AssemblyStoreAssembly.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/AssemblyStoreAssembly.java @@ -1,8 +1,5 @@ package com.zane.smapiinstaller.dto; -import lombok.Data; - -@Data public class AssemblyStoreAssembly { private Integer dataOffset; private Integer dataSize; @@ -10,4 +7,129 @@ public class AssemblyStoreAssembly { private Integer debugDataSize; private Integer configDataOffset; private Integer configDataSize; + + // + @SuppressWarnings("all") + public AssemblyStoreAssembly() { + } + + @SuppressWarnings("all") + public Integer getDataOffset() { + return this.dataOffset; + } + + @SuppressWarnings("all") + public Integer getDataSize() { + return this.dataSize; + } + + @SuppressWarnings("all") + public Integer getDebugDataOffset() { + return this.debugDataOffset; + } + + @SuppressWarnings("all") + public Integer getDebugDataSize() { + return this.debugDataSize; + } + + @SuppressWarnings("all") + public Integer getConfigDataOffset() { + return this.configDataOffset; + } + + @SuppressWarnings("all") + public Integer getConfigDataSize() { + return this.configDataSize; + } + + @SuppressWarnings("all") + public void setDataOffset(final Integer dataOffset) { + this.dataOffset = dataOffset; + } + + @SuppressWarnings("all") + public void setDataSize(final Integer dataSize) { + this.dataSize = dataSize; + } + + @SuppressWarnings("all") + public void setDebugDataOffset(final Integer debugDataOffset) { + this.debugDataOffset = debugDataOffset; + } + + @SuppressWarnings("all") + public void setDebugDataSize(final Integer debugDataSize) { + this.debugDataSize = debugDataSize; + } + + @SuppressWarnings("all") + public void setConfigDataOffset(final Integer configDataOffset) { + this.configDataOffset = configDataOffset; + } + + @SuppressWarnings("all") + public void setConfigDataSize(final Integer configDataSize) { + this.configDataSize = configDataSize; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof AssemblyStoreAssembly)) return false; + final AssemblyStoreAssembly other = (AssemblyStoreAssembly) o; + if (!other.canEqual((Object) this)) return false; + final Object this$dataOffset = this.getDataOffset(); + final Object other$dataOffset = other.getDataOffset(); + if (this$dataOffset == null ? other$dataOffset != null : !this$dataOffset.equals(other$dataOffset)) return false; + final Object this$dataSize = this.getDataSize(); + final Object other$dataSize = other.getDataSize(); + if (this$dataSize == null ? other$dataSize != null : !this$dataSize.equals(other$dataSize)) return false; + final Object this$debugDataOffset = this.getDebugDataOffset(); + final Object other$debugDataOffset = other.getDebugDataOffset(); + if (this$debugDataOffset == null ? other$debugDataOffset != null : !this$debugDataOffset.equals(other$debugDataOffset)) return false; + final Object this$debugDataSize = this.getDebugDataSize(); + final Object other$debugDataSize = other.getDebugDataSize(); + if (this$debugDataSize == null ? other$debugDataSize != null : !this$debugDataSize.equals(other$debugDataSize)) return false; + final Object this$configDataOffset = this.getConfigDataOffset(); + final Object other$configDataOffset = other.getConfigDataOffset(); + if (this$configDataOffset == null ? other$configDataOffset != null : !this$configDataOffset.equals(other$configDataOffset)) return false; + final Object this$configDataSize = this.getConfigDataSize(); + final Object other$configDataSize = other.getConfigDataSize(); + if (this$configDataSize == null ? other$configDataSize != null : !this$configDataSize.equals(other$configDataSize)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof AssemblyStoreAssembly; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $dataOffset = this.getDataOffset(); + result = result * PRIME + ($dataOffset == null ? 43 : $dataOffset.hashCode()); + final Object $dataSize = this.getDataSize(); + result = result * PRIME + ($dataSize == null ? 43 : $dataSize.hashCode()); + final Object $debugDataOffset = this.getDebugDataOffset(); + result = result * PRIME + ($debugDataOffset == null ? 43 : $debugDataOffset.hashCode()); + final Object $debugDataSize = this.getDebugDataSize(); + result = result * PRIME + ($debugDataSize == null ? 43 : $debugDataSize.hashCode()); + final Object $configDataOffset = this.getConfigDataOffset(); + result = result * PRIME + ($configDataOffset == null ? 43 : $configDataOffset.hashCode()); + final Object $configDataSize = this.getConfigDataSize(); + result = result * PRIME + ($configDataSize == null ? 43 : $configDataSize.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "AssemblyStoreAssembly(dataOffset=" + this.getDataOffset() + ", dataSize=" + this.getDataSize() + ", debugDataOffset=" + this.getDebugDataOffset() + ", debugDataSize=" + this.getDebugDataSize() + ", configDataOffset=" + this.getConfigDataOffset() + ", configDataSize=" + this.getConfigDataSize() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/GoogleTranslationDto.java b/app/src/main/java/com/zane/smapiinstaller/dto/GoogleTranslationDto.java index c708ff7..97ab2e2 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/GoogleTranslationDto.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/GoogleTranslationDto.java @@ -2,21 +2,173 @@ package com.zane.smapiinstaller.dto; import java.util.List; -import lombok.Data; - /** * @author Zane */ -@Data public class GoogleTranslationDto { private List sentences; private String src; private double confidence; - @Data + public static class Entry { private String trans; private String orig; private int backend; + + // + @SuppressWarnings("all") + public Entry() { + } + + @SuppressWarnings("all") + public String getTrans() { + return this.trans; + } + + @SuppressWarnings("all") + public String getOrig() { + return this.orig; + } + + @SuppressWarnings("all") + public int getBackend() { + return this.backend; + } + + @SuppressWarnings("all") + public void setTrans(final String trans) { + this.trans = trans; + } + + @SuppressWarnings("all") + public void setOrig(final String orig) { + this.orig = orig; + } + + @SuppressWarnings("all") + public void setBackend(final int backend) { + this.backend = backend; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof GoogleTranslationDto.Entry)) return false; + final GoogleTranslationDto.Entry other = (GoogleTranslationDto.Entry) o; + if (!other.canEqual((Object) this)) return false; + if (this.getBackend() != other.getBackend()) return false; + final Object this$trans = this.getTrans(); + final Object other$trans = other.getTrans(); + if (this$trans == null ? other$trans != null : !this$trans.equals(other$trans)) return false; + final Object this$orig = this.getOrig(); + final Object other$orig = other.getOrig(); + if (this$orig == null ? other$orig != null : !this$orig.equals(other$orig)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof GoogleTranslationDto.Entry; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getBackend(); + final Object $trans = this.getTrans(); + result = result * PRIME + ($trans == null ? 43 : $trans.hashCode()); + final Object $orig = this.getOrig(); + result = result * PRIME + ($orig == null ? 43 : $orig.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "GoogleTranslationDto.Entry(trans=" + this.getTrans() + ", orig=" + this.getOrig() + ", backend=" + this.getBackend() + ")"; + } + // } + + // + @SuppressWarnings("all") + public GoogleTranslationDto() { + } + + @SuppressWarnings("all") + public List getSentences() { + return this.sentences; + } + + @SuppressWarnings("all") + public String getSrc() { + return this.src; + } + + @SuppressWarnings("all") + public double getConfidence() { + return this.confidence; + } + + @SuppressWarnings("all") + public void setSentences(final List sentences) { + this.sentences = sentences; + } + + @SuppressWarnings("all") + public void setSrc(final String src) { + this.src = src; + } + + @SuppressWarnings("all") + public void setConfidence(final double confidence) { + this.confidence = confidence; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof GoogleTranslationDto)) return false; + final GoogleTranslationDto other = (GoogleTranslationDto) o; + if (!other.canEqual((Object) this)) return false; + if (Double.compare(this.getConfidence(), other.getConfidence()) != 0) return false; + final Object this$sentences = this.getSentences(); + final Object other$sentences = other.getSentences(); + if (this$sentences == null ? other$sentences != null : !this$sentences.equals(other$sentences)) return false; + final Object this$src = this.getSrc(); + final Object other$src = other.getSrc(); + if (this$src == null ? other$src != null : !this$src.equals(other$src)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof GoogleTranslationDto; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final long $confidence = Double.doubleToLongBits(this.getConfidence()); + result = result * PRIME + (int) ($confidence >>> 32 ^ $confidence); + final Object $sentences = this.getSentences(); + result = result * PRIME + ($sentences == null ? 43 : $sentences.hashCode()); + final Object $src = this.getSrc(); + result = result * PRIME + ($src == null ? 43 : $src.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "GoogleTranslationDto(sentences=" + this.getSentences() + ", src=" + this.getSrc() + ", confidence=" + this.getConfidence() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/JsonEditorObject.java b/app/src/main/java/com/zane/smapiinstaller/dto/JsonEditorObject.java index a18a191..61f0865 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/JsonEditorObject.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/JsonEditorObject.java @@ -1,15 +1,11 @@ package com.zane.smapiinstaller.dto; import android.webkit.JavascriptInterface; - import java.util.function.Consumer; -import lombok.AllArgsConstructor; - /** * @author Zane */ -@AllArgsConstructor public class JsonEditorObject { private String text; private String mode; @@ -26,7 +22,7 @@ public class JsonEditorObject { @JavascriptInterface public void setText(String text) { this.text = text; - if(setterCallback != null) { + if (setterCallback != null) { setterCallback.accept(text); } } @@ -50,4 +46,16 @@ public class JsonEditorObject { public String getLanguage() { return language; } + + // + @SuppressWarnings("all") + public JsonEditorObject(final String text, final String mode, final String language, final boolean editable, final int height, final Consumer setterCallback) { + this.text = text; + this.mode = mode; + this.language = language; + this.editable = editable; + this.height = height; + this.setterCallback = setterCallback; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/KeyboardEditorObject.java b/app/src/main/java/com/zane/smapiinstaller/dto/KeyboardEditorObject.java index 7f36f6c..b157f05 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/KeyboardEditorObject.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/KeyboardEditorObject.java @@ -1,15 +1,11 @@ package com.zane.smapiinstaller.dto; import android.webkit.JavascriptInterface; - import java.util.function.Consumer; -import lombok.AllArgsConstructor; - /** * @author Zane */ -@AllArgsConstructor public class KeyboardEditorObject { private String text; private String language; @@ -27,7 +23,7 @@ public class KeyboardEditorObject { @JavascriptInterface public void setText(String text) { this.text = text; - if(setterCallback != null) { + if (setterCallback != null) { setterCallback.accept(text); } } @@ -56,4 +52,17 @@ public class KeyboardEditorObject { public String getLanguage() { return language; } + + // + @SuppressWarnings("all") + public KeyboardEditorObject(final String text, final String language, final int height, final int width, final float scale, final boolean landscape, final Consumer setterCallback) { + this.text = text; + this.language = language; + this.height = height; + this.width = width; + this.scale = scale; + this.landscape = landscape; + this.setterCallback = setterCallback; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckRequestDto.java b/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckRequestDto.java index 78f8287..83f294f 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckRequestDto.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckRequestDto.java @@ -1,30 +1,19 @@ package com.zane.smapiinstaller.dto; import android.util.Log; - import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.google.common.base.CharMatcher; import com.google.common.base.Splitter; import com.zane.smapiinstaller.constant.Constants; import com.zane.smapiinstaller.entity.ModManifestEntry; - import org.apache.commons.lang3.RegExUtils; import org.apache.commons.lang3.StringUtils; - import java.util.List; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; - /** * @author Zane */ -@Data -@RequiredArgsConstructor public class ModUpdateCheckRequestDto { - public ModUpdateCheckRequestDto(List mods, SemanticVersion gameVersion) { this.mods = mods; this.gameVersion = gameVersion; @@ -33,7 +22,6 @@ public class ModUpdateCheckRequestDto { /** * 待检查MOD列表 */ - @NonNull private List mods; /** * SMAPI版本 @@ -52,7 +40,7 @@ public class ModUpdateCheckRequestDto { */ private boolean includeExtendedMetadata = false; - @Data + @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE) public static class SemanticVersion { private int MajorVersion; @@ -80,23 +68,20 @@ public class ModUpdateCheckRequestDto { int i = 0; if (versionSections.size() > i) { MajorVersion = Integer.parseInt(versionSections.get(i)); - } - else { + } else { return; } i++; if (versionSections.size() > i) { MinorVersion = Integer.parseInt(versionSections.get(i)); - } - else { + } else { return; } i++; // read optional patch version if (versionSections.size() > i) { PatchVersion = Integer.parseInt(versionSections.get(i)); - } - else { + } else { return; } i++; @@ -104,8 +89,7 @@ public class ModUpdateCheckRequestDto { try { if (versionSections.size() > i) { PlatformRelease = Integer.parseInt(versionSections.get(i)); - } - else { + } else { return; } } catch (NumberFormatException ignored) { @@ -114,8 +98,7 @@ public class ModUpdateCheckRequestDto { versionSections = Splitter.on("-").limit(2).splitToList(versionStr); if (versionSections.size() > 1) { PrereleaseTag = RegExUtils.removeFirst(versionSections.get(1), "\\+.*"); - } - else { + } else { return; } // read optional build tag @@ -124,10 +107,118 @@ public class ModUpdateCheckRequestDto { BuildMetadata = versionSections.get(1); } } + + // + @SuppressWarnings("all") + public int getMajorVersion() { + return this.MajorVersion; + } + + @SuppressWarnings("all") + public int getMinorVersion() { + return this.MinorVersion; + } + + @SuppressWarnings("all") + public int getPatchVersion() { + return this.PatchVersion; + } + + @SuppressWarnings("all") + public int getPlatformRelease() { + return this.PlatformRelease; + } + + @SuppressWarnings("all") + public String getPrereleaseTag() { + return this.PrereleaseTag; + } + + @SuppressWarnings("all") + public String getBuildMetadata() { + return this.BuildMetadata; + } + + @SuppressWarnings("all") + public void setMajorVersion(final int MajorVersion) { + this.MajorVersion = MajorVersion; + } + + @SuppressWarnings("all") + public void setMinorVersion(final int MinorVersion) { + this.MinorVersion = MinorVersion; + } + + @SuppressWarnings("all") + public void setPatchVersion(final int PatchVersion) { + this.PatchVersion = PatchVersion; + } + + @SuppressWarnings("all") + public void setPlatformRelease(final int PlatformRelease) { + this.PlatformRelease = PlatformRelease; + } + + @SuppressWarnings("all") + public void setPrereleaseTag(final String PrereleaseTag) { + this.PrereleaseTag = PrereleaseTag; + } + + @SuppressWarnings("all") + public void setBuildMetadata(final String BuildMetadata) { + this.BuildMetadata = BuildMetadata; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckRequestDto.SemanticVersion)) return false; + final ModUpdateCheckRequestDto.SemanticVersion other = (ModUpdateCheckRequestDto.SemanticVersion) o; + if (!other.canEqual((Object) this)) return false; + if (this.getMajorVersion() != other.getMajorVersion()) return false; + if (this.getMinorVersion() != other.getMinorVersion()) return false; + if (this.getPatchVersion() != other.getPatchVersion()) return false; + if (this.getPlatformRelease() != other.getPlatformRelease()) return false; + final Object this$PrereleaseTag = this.getPrereleaseTag(); + final Object other$PrereleaseTag = other.getPrereleaseTag(); + if (this$PrereleaseTag == null ? other$PrereleaseTag != null : !this$PrereleaseTag.equals(other$PrereleaseTag)) return false; + final Object this$BuildMetadata = this.getBuildMetadata(); + final Object other$BuildMetadata = other.getBuildMetadata(); + if (this$BuildMetadata == null ? other$BuildMetadata != null : !this$BuildMetadata.equals(other$BuildMetadata)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckRequestDto.SemanticVersion; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getMajorVersion(); + result = result * PRIME + this.getMinorVersion(); + result = result * PRIME + this.getPatchVersion(); + result = result * PRIME + this.getPlatformRelease(); + final Object $PrereleaseTag = this.getPrereleaseTag(); + result = result * PRIME + ($PrereleaseTag == null ? 43 : $PrereleaseTag.hashCode()); + final Object $BuildMetadata = this.getBuildMetadata(); + result = result * PRIME + ($BuildMetadata == null ? 43 : $BuildMetadata.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckRequestDto.SemanticVersion(MajorVersion=" + this.getMajorVersion() + ", MinorVersion=" + this.getMinorVersion() + ", PatchVersion=" + this.getPatchVersion() + ", PlatformRelease=" + this.getPlatformRelease() + ", PrereleaseTag=" + this.getPrereleaseTag() + ", BuildMetadata=" + this.getBuildMetadata() + ")"; + } + // } - @Data - @EqualsAndHashCode(of = "id") + public static class ModInfo { private String id; private List updateKeys; @@ -144,5 +235,219 @@ public class ModUpdateCheckRequestDto { modInfo.setUpdateKeys(mod.getUpdateKeys()); return modInfo; } + + // + @SuppressWarnings("all") + public ModInfo() { + } + + @SuppressWarnings("all") + public String getId() { + return this.id; + } + + @SuppressWarnings("all") + public List getUpdateKeys() { + return this.updateKeys; + } + + @SuppressWarnings("all") + public SemanticVersion getInstalledVersion() { + return this.installedVersion; + } + + @SuppressWarnings("all") + public void setId(final String id) { + this.id = id; + } + + @SuppressWarnings("all") + public void setUpdateKeys(final List updateKeys) { + this.updateKeys = updateKeys; + } + + @SuppressWarnings("all") + public void setInstalledVersion(final SemanticVersion installedVersion) { + this.installedVersion = installedVersion; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckRequestDto.ModInfo(id=" + this.getId() + ", updateKeys=" + this.getUpdateKeys() + ", installedVersion=" + this.getInstalledVersion() + ")"; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckRequestDto.ModInfo)) return false; + final ModUpdateCheckRequestDto.ModInfo other = (ModUpdateCheckRequestDto.ModInfo) o; + if (!other.canEqual((Object) this)) return false; + final Object this$id = this.getId(); + final Object other$id = other.getId(); + if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckRequestDto.ModInfo; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $id = this.getId(); + result = result * PRIME + ($id == null ? 43 : $id.hashCode()); + return result; + } + // } + + // + /** + * 待检查MOD列表 + */ + @SuppressWarnings("all") + public List getMods() { + return this.mods; + } + + /** + * SMAPI版本 + */ + @SuppressWarnings("all") + public SemanticVersion getApiVersion() { + return this.apiVersion; + } + + /** + * 游戏版本 + */ + @SuppressWarnings("all") + public SemanticVersion getGameVersion() { + return this.gameVersion; + } + + /** + * 平台版本 + */ + @SuppressWarnings("all") + public String getPlatform() { + return this.platform; + } + + /** + * 是否拉取MOD详情 + */ + @SuppressWarnings("all") + public boolean isIncludeExtendedMetadata() { + return this.includeExtendedMetadata; + } + + /** + * 待检查MOD列表 + */ + @SuppressWarnings("all") + public void setMods(final List mods) { + if (mods == null) { + throw new NullPointerException("mods is marked non-null but is null"); + } + this.mods = mods; + } + + /** + * SMAPI版本 + */ + @SuppressWarnings("all") + public void setApiVersion(final SemanticVersion apiVersion) { + this.apiVersion = apiVersion; + } + + /** + * 游戏版本 + */ + @SuppressWarnings("all") + public void setGameVersion(final SemanticVersion gameVersion) { + this.gameVersion = gameVersion; + } + + /** + * 平台版本 + */ + @SuppressWarnings("all") + public void setPlatform(final String platform) { + this.platform = platform; + } + + /** + * 是否拉取MOD详情 + */ + @SuppressWarnings("all") + public void setIncludeExtendedMetadata(final boolean includeExtendedMetadata) { + this.includeExtendedMetadata = includeExtendedMetadata; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckRequestDto)) return false; + final ModUpdateCheckRequestDto other = (ModUpdateCheckRequestDto) o; + if (!other.canEqual((Object) this)) return false; + if (this.isIncludeExtendedMetadata() != other.isIncludeExtendedMetadata()) return false; + final Object this$mods = this.getMods(); + final Object other$mods = other.getMods(); + if (this$mods == null ? other$mods != null : !this$mods.equals(other$mods)) return false; + final Object this$apiVersion = this.getApiVersion(); + final Object other$apiVersion = other.getApiVersion(); + if (this$apiVersion == null ? other$apiVersion != null : !this$apiVersion.equals(other$apiVersion)) return false; + final Object this$gameVersion = this.getGameVersion(); + final Object other$gameVersion = other.getGameVersion(); + if (this$gameVersion == null ? other$gameVersion != null : !this$gameVersion.equals(other$gameVersion)) return false; + final Object this$platform = this.getPlatform(); + final Object other$platform = other.getPlatform(); + if (this$platform == null ? other$platform != null : !this$platform.equals(other$platform)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckRequestDto; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + (this.isIncludeExtendedMetadata() ? 79 : 97); + final Object $mods = this.getMods(); + result = result * PRIME + ($mods == null ? 43 : $mods.hashCode()); + final Object $apiVersion = this.getApiVersion(); + result = result * PRIME + ($apiVersion == null ? 43 : $apiVersion.hashCode()); + final Object $gameVersion = this.getGameVersion(); + result = result * PRIME + ($gameVersion == null ? 43 : $gameVersion.hashCode()); + final Object $platform = this.getPlatform(); + result = result * PRIME + ($platform == null ? 43 : $platform.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckRequestDto(mods=" + this.getMods() + ", apiVersion=" + this.getApiVersion() + ", gameVersion=" + this.getGameVersion() + ", platform=" + this.getPlatform() + ", includeExtendedMetadata=" + this.isIncludeExtendedMetadata() + ")"; + } + + @SuppressWarnings("all") + public ModUpdateCheckRequestDto(final List mods) { + if (mods == null) { + throw new NullPointerException("mods is marked non-null but is null"); + } + this.mods = mods; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckResponseDto.java b/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckResponseDto.java index f463c9e..9c8dbe3 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckResponseDto.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/ModUpdateCheckResponseDto.java @@ -2,34 +2,310 @@ package com.zane.smapiinstaller.dto; import java.util.List; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Zane */ -@Data public class ModUpdateCheckResponseDto { private String id; private UpdateInfo suggestedUpdate; private List errors; private Metadata metadata; - @Data - @NoArgsConstructor - @AllArgsConstructor + + public static class UpdateInfo { private String version; private String url; + + // + @SuppressWarnings("all") + public String getVersion() { + return this.version; + } + + @SuppressWarnings("all") + public String getUrl() { + return this.url; + } + + @SuppressWarnings("all") + public void setVersion(final String version) { + this.version = version; + } + + @SuppressWarnings("all") + public void setUrl(final String url) { + this.url = url; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckResponseDto.UpdateInfo)) return false; + final ModUpdateCheckResponseDto.UpdateInfo other = (ModUpdateCheckResponseDto.UpdateInfo) o; + if (!other.canEqual((Object) this)) return false; + final Object this$version = this.getVersion(); + final Object other$version = other.getVersion(); + if (this$version == null ? other$version != null : !this$version.equals(other$version)) return false; + final Object this$url = this.getUrl(); + final Object other$url = other.getUrl(); + if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckResponseDto.UpdateInfo; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $version = this.getVersion(); + result = result * PRIME + ($version == null ? 43 : $version.hashCode()); + final Object $url = this.getUrl(); + result = result * PRIME + ($url == null ? 43 : $url.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckResponseDto.UpdateInfo(version=" + this.getVersion() + ", url=" + this.getUrl() + ")"; + } + + @SuppressWarnings("all") + public UpdateInfo() { + } + + @SuppressWarnings("all") + public UpdateInfo(final String version, final String url) { + this.version = version; + this.url = url; + } + // } - @Data + public static class Metadata { private Main main; - @Data + + public static class Main { private String version; private String url; + + // + @SuppressWarnings("all") + public Main() { + } + + @SuppressWarnings("all") + public String getVersion() { + return this.version; + } + + @SuppressWarnings("all") + public String getUrl() { + return this.url; + } + + @SuppressWarnings("all") + public void setVersion(final String version) { + this.version = version; + } + + @SuppressWarnings("all") + public void setUrl(final String url) { + this.url = url; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckResponseDto.Metadata.Main)) return false; + final ModUpdateCheckResponseDto.Metadata.Main other = (ModUpdateCheckResponseDto.Metadata.Main) o; + if (!other.canEqual((Object) this)) return false; + final Object this$version = this.getVersion(); + final Object other$version = other.getVersion(); + if (this$version == null ? other$version != null : !this$version.equals(other$version)) return false; + final Object this$url = this.getUrl(); + final Object other$url = other.getUrl(); + if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckResponseDto.Metadata.Main; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $version = this.getVersion(); + result = result * PRIME + ($version == null ? 43 : $version.hashCode()); + final Object $url = this.getUrl(); + result = result * PRIME + ($url == null ? 43 : $url.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckResponseDto.Metadata.Main(version=" + this.getVersion() + ", url=" + this.getUrl() + ")"; + } + // } + + // + @SuppressWarnings("all") + public Metadata() { + } + + @SuppressWarnings("all") + public Main getMain() { + return this.main; + } + + @SuppressWarnings("all") + public void setMain(final Main main) { + this.main = main; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckResponseDto.Metadata)) return false; + final ModUpdateCheckResponseDto.Metadata other = (ModUpdateCheckResponseDto.Metadata) o; + if (!other.canEqual((Object) this)) return false; + final Object this$main = this.getMain(); + final Object other$main = other.getMain(); + if (this$main == null ? other$main != null : !this$main.equals(other$main)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckResponseDto.Metadata; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $main = this.getMain(); + result = result * PRIME + ($main == null ? 43 : $main.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckResponseDto.Metadata(main=" + this.getMain() + ")"; + } + // } + + // + @SuppressWarnings("all") + public ModUpdateCheckResponseDto() { + } + + @SuppressWarnings("all") + public String getId() { + return this.id; + } + + @SuppressWarnings("all") + public UpdateInfo getSuggestedUpdate() { + return this.suggestedUpdate; + } + + @SuppressWarnings("all") + public List getErrors() { + return this.errors; + } + + @SuppressWarnings("all") + public Metadata getMetadata() { + return this.metadata; + } + + @SuppressWarnings("all") + public void setId(final String id) { + this.id = id; + } + + @SuppressWarnings("all") + public void setSuggestedUpdate(final UpdateInfo suggestedUpdate) { + this.suggestedUpdate = suggestedUpdate; + } + + @SuppressWarnings("all") + public void setErrors(final List errors) { + this.errors = errors; + } + + @SuppressWarnings("all") + public void setMetadata(final Metadata metadata) { + this.metadata = metadata; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModUpdateCheckResponseDto)) return false; + final ModUpdateCheckResponseDto other = (ModUpdateCheckResponseDto) o; + if (!other.canEqual((Object) this)) return false; + final Object this$id = this.getId(); + final Object other$id = other.getId(); + if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false; + final Object this$suggestedUpdate = this.getSuggestedUpdate(); + final Object other$suggestedUpdate = other.getSuggestedUpdate(); + if (this$suggestedUpdate == null ? other$suggestedUpdate != null : !this$suggestedUpdate.equals(other$suggestedUpdate)) return false; + final Object this$errors = this.getErrors(); + final Object other$errors = other.getErrors(); + if (this$errors == null ? other$errors != null : !this$errors.equals(other$errors)) return false; + final Object this$metadata = this.getMetadata(); + final Object other$metadata = other.getMetadata(); + if (this$metadata == null ? other$metadata != null : !this$metadata.equals(other$metadata)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModUpdateCheckResponseDto; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $id = this.getId(); + result = result * PRIME + ($id == null ? 43 : $id.hashCode()); + final Object $suggestedUpdate = this.getSuggestedUpdate(); + result = result * PRIME + ($suggestedUpdate == null ? 43 : $suggestedUpdate.hashCode()); + final Object $errors = this.getErrors(); + result = result * PRIME + ($errors == null ? 43 : $errors.hashCode()); + final Object $metadata = this.getMetadata(); + result = result * PRIME + ($metadata == null ? 43 : $metadata.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModUpdateCheckResponseDto(id=" + this.getId() + ", suggestedUpdate=" + this.getSuggestedUpdate() + ", errors=" + this.getErrors() + ", metadata=" + this.getMetadata() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/Tuple2.java b/app/src/main/java/com/zane/smapiinstaller/dto/Tuple2.java index f7236e1..db600d4 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/Tuple2.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/Tuple2.java @@ -1,11 +1,73 @@ package com.zane.smapiinstaller.dto; -import lombok.AllArgsConstructor; -import lombok.Data; - -@Data -@AllArgsConstructor public class Tuple2 { private U first; private V second; + + // + @SuppressWarnings("all") + public U getFirst() { + return this.first; + } + + @SuppressWarnings("all") + public V getSecond() { + return this.second; + } + + @SuppressWarnings("all") + public void setFirst(final U first) { + this.first = first; + } + + @SuppressWarnings("all") + public void setSecond(final V second) { + this.second = second; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof Tuple2)) return false; + final Tuple2 other = (Tuple2) o; + if (!other.canEqual((Object) this)) return false; + final Object this$first = this.getFirst(); + final Object other$first = other.getFirst(); + if (this$first == null ? other$first != null : !this$first.equals(other$first)) return false; + final Object this$second = this.getSecond(); + final Object other$second = other.getSecond(); + if (this$second == null ? other$second != null : !this$second.equals(other$second)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof Tuple2; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $first = this.getFirst(); + result = result * PRIME + ($first == null ? 43 : $first.hashCode()); + final Object $second = this.getSecond(); + result = result * PRIME + ($second == null ? 43 : $second.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "Tuple2(first=" + this.getFirst() + ", second=" + this.getSecond() + ")"; + } + + @SuppressWarnings("all") + public Tuple2(final U first, final V second) { + this.first = first; + this.second = second; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/dto/YouDaoTranslationDto.java b/app/src/main/java/com/zane/smapiinstaller/dto/YouDaoTranslationDto.java index 8755a52..0c57caa 100644 --- a/app/src/main/java/com/zane/smapiinstaller/dto/YouDaoTranslationDto.java +++ b/app/src/main/java/com/zane/smapiinstaller/dto/YouDaoTranslationDto.java @@ -2,21 +2,172 @@ package com.zane.smapiinstaller.dto; import java.util.List; -import lombok.Data; - /** * @author Zane */ -@Data public class YouDaoTranslationDto { private String type; private int errorCode; private int elapsedTime; private List> translateResult; - @Data + public static class Entry { private String src; private String tgt; + + // + @SuppressWarnings("all") + public Entry() { + } + + @SuppressWarnings("all") + public String getSrc() { + return this.src; + } + + @SuppressWarnings("all") + public String getTgt() { + return this.tgt; + } + + @SuppressWarnings("all") + public void setSrc(final String src) { + this.src = src; + } + + @SuppressWarnings("all") + public void setTgt(final String tgt) { + this.tgt = tgt; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof YouDaoTranslationDto.Entry)) return false; + final YouDaoTranslationDto.Entry other = (YouDaoTranslationDto.Entry) o; + if (!other.canEqual((Object) this)) return false; + final Object this$src = this.getSrc(); + final Object other$src = other.getSrc(); + if (this$src == null ? other$src != null : !this$src.equals(other$src)) return false; + final Object this$tgt = this.getTgt(); + final Object other$tgt = other.getTgt(); + if (this$tgt == null ? other$tgt != null : !this$tgt.equals(other$tgt)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof YouDaoTranslationDto.Entry; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $src = this.getSrc(); + result = result * PRIME + ($src == null ? 43 : $src.hashCode()); + final Object $tgt = this.getTgt(); + result = result * PRIME + ($tgt == null ? 43 : $tgt.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "YouDaoTranslationDto.Entry(src=" + this.getSrc() + ", tgt=" + this.getTgt() + ")"; + } + // } + + // + @SuppressWarnings("all") + public YouDaoTranslationDto() { + } + + @SuppressWarnings("all") + public String getType() { + return this.type; + } + + @SuppressWarnings("all") + public int getErrorCode() { + return this.errorCode; + } + + @SuppressWarnings("all") + public int getElapsedTime() { + return this.elapsedTime; + } + + @SuppressWarnings("all") + public List> getTranslateResult() { + return this.translateResult; + } + + @SuppressWarnings("all") + public void setType(final String type) { + this.type = type; + } + + @SuppressWarnings("all") + public void setErrorCode(final int errorCode) { + this.errorCode = errorCode; + } + + @SuppressWarnings("all") + public void setElapsedTime(final int elapsedTime) { + this.elapsedTime = elapsedTime; + } + + @SuppressWarnings("all") + public void setTranslateResult(final List> translateResult) { + this.translateResult = translateResult; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof YouDaoTranslationDto)) return false; + final YouDaoTranslationDto other = (YouDaoTranslationDto) o; + if (!other.canEqual((Object) this)) return false; + if (this.getErrorCode() != other.getErrorCode()) return false; + if (this.getElapsedTime() != other.getElapsedTime()) return false; + final Object this$type = this.getType(); + final Object other$type = other.getType(); + if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false; + final Object this$translateResult = this.getTranslateResult(); + final Object other$translateResult = other.getTranslateResult(); + if (this$translateResult == null ? other$translateResult != null : !this$translateResult.equals(other$translateResult)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof YouDaoTranslationDto; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getErrorCode(); + result = result * PRIME + this.getElapsedTime(); + final Object $type = this.getType(); + result = result * PRIME + ($type == null ? 43 : $type.hashCode()); + final Object $translateResult = this.getTranslateResult(); + result = result * PRIME + ($translateResult == null ? 43 : $translateResult.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "YouDaoTranslationDto(type=" + this.getType() + ", errorCode=" + this.getErrorCode() + ", elapsedTime=" + this.getElapsedTime() + ", translateResult=" + this.getTranslateResult() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/ApkFilesManifest.java b/app/src/main/java/com/zane/smapiinstaller/entity/ApkFilesManifest.java index 158aef3..b958345 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/ApkFilesManifest.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/ApkFilesManifest.java @@ -3,13 +3,10 @@ package com.zane.smapiinstaller.entity; import java.util.List; import java.util.Set; -import lombok.Data; - /** * SMAPI所需处理的文件清单 * @author Zane */ -@Data public class ApkFilesManifest { /** * 最小兼容版本,包含 @@ -23,10 +20,141 @@ public class ApkFilesManifest { * 兼容包基础文件路径 */ private String basePath; - private Set targetPackageName; /** * 文件清单 */ private List manifestEntries; + + // + @SuppressWarnings("all") + public ApkFilesManifest() { + } + + /** + * 最小兼容版本,包含 + */ + @SuppressWarnings("all") + public long getMinBuildCode() { + return this.minBuildCode; + } + + /** + * 最大兼容版本,包含 + */ + @SuppressWarnings("all") + public Long getMaxBuildCode() { + return this.maxBuildCode; + } + + /** + * 兼容包基础文件路径 + */ + @SuppressWarnings("all") + public String getBasePath() { + return this.basePath; + } + + @SuppressWarnings("all") + public Set getTargetPackageName() { + return this.targetPackageName; + } + + /** + * 文件清单 + */ + @SuppressWarnings("all") + public List getManifestEntries() { + return this.manifestEntries; + } + + /** + * 最小兼容版本,包含 + */ + @SuppressWarnings("all") + public void setMinBuildCode(final long minBuildCode) { + this.minBuildCode = minBuildCode; + } + + /** + * 最大兼容版本,包含 + */ + @SuppressWarnings("all") + public void setMaxBuildCode(final Long maxBuildCode) { + this.maxBuildCode = maxBuildCode; + } + + /** + * 兼容包基础文件路径 + */ + @SuppressWarnings("all") + public void setBasePath(final String basePath) { + this.basePath = basePath; + } + + @SuppressWarnings("all") + public void setTargetPackageName(final Set targetPackageName) { + this.targetPackageName = targetPackageName; + } + + /** + * 文件清单 + */ + @SuppressWarnings("all") + public void setManifestEntries(final List manifestEntries) { + this.manifestEntries = manifestEntries; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ApkFilesManifest)) return false; + final ApkFilesManifest other = (ApkFilesManifest) o; + if (!other.canEqual((Object) this)) return false; + if (this.getMinBuildCode() != other.getMinBuildCode()) return false; + final Object this$maxBuildCode = this.getMaxBuildCode(); + final Object other$maxBuildCode = other.getMaxBuildCode(); + if (this$maxBuildCode == null ? other$maxBuildCode != null : !this$maxBuildCode.equals(other$maxBuildCode)) return false; + final Object this$basePath = this.getBasePath(); + final Object other$basePath = other.getBasePath(); + if (this$basePath == null ? other$basePath != null : !this$basePath.equals(other$basePath)) return false; + final Object this$targetPackageName = this.getTargetPackageName(); + final Object other$targetPackageName = other.getTargetPackageName(); + if (this$targetPackageName == null ? other$targetPackageName != null : !this$targetPackageName.equals(other$targetPackageName)) return false; + final Object this$manifestEntries = this.getManifestEntries(); + final Object other$manifestEntries = other.getManifestEntries(); + if (this$manifestEntries == null ? other$manifestEntries != null : !this$manifestEntries.equals(other$manifestEntries)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ApkFilesManifest; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final long $minBuildCode = this.getMinBuildCode(); + result = result * PRIME + (int) ($minBuildCode >>> 32 ^ $minBuildCode); + final Object $maxBuildCode = this.getMaxBuildCode(); + result = result * PRIME + ($maxBuildCode == null ? 43 : $maxBuildCode.hashCode()); + final Object $basePath = this.getBasePath(); + result = result * PRIME + ($basePath == null ? 43 : $basePath.hashCode()); + final Object $targetPackageName = this.getTargetPackageName(); + result = result * PRIME + ($targetPackageName == null ? 43 : $targetPackageName.hashCode()); + final Object $manifestEntries = this.getManifestEntries(); + result = result * PRIME + ($manifestEntries == null ? 43 : $manifestEntries.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ApkFilesManifest(minBuildCode=" + this.getMinBuildCode() + ", maxBuildCode=" + this.getMaxBuildCode() + ", basePath=" + this.getBasePath() + ", targetPackageName=" + this.getTargetPackageName() + ", manifestEntries=" + this.getManifestEntries() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContent.java b/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContent.java index 60fcfd7..7c46145 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContent.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContent.java @@ -1,12 +1,9 @@ package com.zane.smapiinstaller.entity; -import lombok.Data; - /** * 可下载内容包 * @author Zane */ -@Data public class DownloadableContent { /** * 类型,COMPAT:兼容包/LOCALE:语言包 @@ -32,4 +29,165 @@ public class DownloadableContent { * 文件SHA3-256校验码 */ private String hash; + + // + @SuppressWarnings("all") + public DownloadableContent() { + } + + /** + * 类型,COMPAT:兼容包/LOCALE:语言包 + */ + @SuppressWarnings("all") + public String getType() { + return this.type; + } + + /** + * 名称 + */ + @SuppressWarnings("all") + public String getName() { + return this.name; + } + + /** + * 资源存放位置 + */ + @SuppressWarnings("all") + public String getAssetPath() { + return this.assetPath; + } + + /** + * 下载位置 + */ + @SuppressWarnings("all") + public String getUrl() { + return this.url; + } + + /** + * 描述 + */ + @SuppressWarnings("all") + public String getDescription() { + return this.description; + } + + /** + * 文件SHA3-256校验码 + */ + @SuppressWarnings("all") + public String getHash() { + return this.hash; + } + + /** + * 类型,COMPAT:兼容包/LOCALE:语言包 + */ + @SuppressWarnings("all") + public void setType(final String type) { + this.type = type; + } + + /** + * 名称 + */ + @SuppressWarnings("all") + public void setName(final String name) { + this.name = name; + } + + /** + * 资源存放位置 + */ + @SuppressWarnings("all") + public void setAssetPath(final String assetPath) { + this.assetPath = assetPath; + } + + /** + * 下载位置 + */ + @SuppressWarnings("all") + public void setUrl(final String url) { + this.url = url; + } + + /** + * 描述 + */ + @SuppressWarnings("all") + public void setDescription(final String description) { + this.description = description; + } + + /** + * 文件SHA3-256校验码 + */ + @SuppressWarnings("all") + public void setHash(final String hash) { + this.hash = hash; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof DownloadableContent)) return false; + final DownloadableContent other = (DownloadableContent) o; + if (!other.canEqual((Object) this)) return false; + final Object this$type = this.getType(); + final Object other$type = other.getType(); + if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false; + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; + final Object this$assetPath = this.getAssetPath(); + final Object other$assetPath = other.getAssetPath(); + if (this$assetPath == null ? other$assetPath != null : !this$assetPath.equals(other$assetPath)) return false; + final Object this$url = this.getUrl(); + final Object other$url = other.getUrl(); + if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false; + final Object this$description = this.getDescription(); + final Object other$description = other.getDescription(); + if (this$description == null ? other$description != null : !this$description.equals(other$description)) return false; + final Object this$hash = this.getHash(); + final Object other$hash = other.getHash(); + if (this$hash == null ? other$hash != null : !this$hash.equals(other$hash)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof DownloadableContent; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $type = this.getType(); + result = result * PRIME + ($type == null ? 43 : $type.hashCode()); + final Object $name = this.getName(); + result = result * PRIME + ($name == null ? 43 : $name.hashCode()); + final Object $assetPath = this.getAssetPath(); + result = result * PRIME + ($assetPath == null ? 43 : $assetPath.hashCode()); + final Object $url = this.getUrl(); + result = result * PRIME + ($url == null ? 43 : $url.hashCode()); + final Object $description = this.getDescription(); + result = result * PRIME + ($description == null ? 43 : $description.hashCode()); + final Object $hash = this.getHash(); + result = result * PRIME + ($hash == null ? 43 : $hash.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "DownloadableContent(type=" + this.getType() + ", name=" + this.getName() + ", assetPath=" + this.getAssetPath() + ", url=" + this.getUrl() + ", description=" + this.getDescription() + ", hash=" + this.getHash() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContentList.java b/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContentList.java index 2201f02..6866876 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContentList.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/DownloadableContentList.java @@ -2,18 +2,70 @@ package com.zane.smapiinstaller.entity; import java.util.List; -import lombok.Data; -import lombok.EqualsAndHashCode; - /** * 可下载内容列表 * @author Zane */ -@Data -@EqualsAndHashCode(callSuper = true) public class DownloadableContentList extends UpdatableList { /** * 列表 */ List contents; + + // + @SuppressWarnings("all") + public DownloadableContentList() { + } + + /** + * 列表 + */ + @SuppressWarnings("all") + public List getContents() { + return this.contents; + } + + /** + * 列表 + */ + @SuppressWarnings("all") + public void setContents(final List contents) { + this.contents = contents; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "DownloadableContentList(contents=" + this.getContents() + ")"; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof DownloadableContentList)) return false; + final DownloadableContentList other = (DownloadableContentList) o; + if (!other.canEqual((Object) this)) return false; + if (!super.equals(o)) return false; + final Object this$contents = this.getContents(); + final Object other$contents = other.getContents(); + if (this$contents == null ? other$contents != null : !this$contents.equals(other$contents)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof DownloadableContentList; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + final Object $contents = this.getContents(); + result = result * PRIME + ($contents == null ? 43 : $contents.hashCode()); + return result; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java b/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java index 10766e0..5b283a2 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/FrameworkConfig.java @@ -4,14 +4,11 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - /** * SMAPI的配置 * @author Zane */ -@Data -@JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.ANY, getterVisibility= JsonAutoDetect.Visibility.NONE) +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE) public class FrameworkConfig { @JsonIgnore private transient boolean initial; @@ -30,22 +27,182 @@ public class FrameworkConfig { */ @JsonProperty("DeveloperMode") private boolean DeveloperMode = false; - /** * 禁用MonoMod */ @JsonProperty("DisableMonoMod") private boolean DisableMonoMod = false; - /** * 是否启用重写丢失的引用点 */ @JsonProperty("RewriteMissing") private boolean RewriteMissing = false; - /** * Mod存放位置 */ @JsonProperty("ModsPath") private String ModsPath = "StardewValley/Mods"; + + // + @SuppressWarnings("all") + public FrameworkConfig() { + } + + @SuppressWarnings("all") + public boolean isInitial() { + return this.initial; + } + + /** + * 详细日志 + */ + @SuppressWarnings("all") + public boolean isVerboseLogging() { + return this.VerboseLogging; + } + + /** + * 检查更新 + */ + @SuppressWarnings("all") + public boolean isCheckForUpdates() { + return this.CheckForUpdates; + } + + /** + * 开发者模式 + */ + @SuppressWarnings("all") + public boolean isDeveloperMode() { + return this.DeveloperMode; + } + + /** + * 禁用MonoMod + */ + @SuppressWarnings("all") + public boolean isDisableMonoMod() { + return this.DisableMonoMod; + } + + /** + * 是否启用重写丢失的引用点 + */ + @SuppressWarnings("all") + public boolean isRewriteMissing() { + return this.RewriteMissing; + } + + /** + * Mod存放位置 + */ + @SuppressWarnings("all") + public String getModsPath() { + return this.ModsPath; + } + + @JsonIgnore + @SuppressWarnings("all") + public void setInitial(final boolean initial) { + this.initial = initial; + } + + /** + * 详细日志 + */ + @JsonProperty("VerboseLogging") + @SuppressWarnings("all") + public void setVerboseLogging(final boolean VerboseLogging) { + this.VerboseLogging = VerboseLogging; + } + + /** + * 检查更新 + */ + @JsonProperty("CheckForUpdates") + @SuppressWarnings("all") + public void setCheckForUpdates(final boolean CheckForUpdates) { + this.CheckForUpdates = CheckForUpdates; + } + + /** + * 开发者模式 + */ + @JsonProperty("DeveloperMode") + @SuppressWarnings("all") + public void setDeveloperMode(final boolean DeveloperMode) { + this.DeveloperMode = DeveloperMode; + } + + /** + * 禁用MonoMod + */ + @JsonProperty("DisableMonoMod") + @SuppressWarnings("all") + public void setDisableMonoMod(final boolean DisableMonoMod) { + this.DisableMonoMod = DisableMonoMod; + } + + /** + * 是否启用重写丢失的引用点 + */ + @JsonProperty("RewriteMissing") + @SuppressWarnings("all") + public void setRewriteMissing(final boolean RewriteMissing) { + this.RewriteMissing = RewriteMissing; + } + + /** + * Mod存放位置 + */ + @JsonProperty("ModsPath") + @SuppressWarnings("all") + public void setModsPath(final String ModsPath) { + this.ModsPath = ModsPath; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof FrameworkConfig)) return false; + final FrameworkConfig other = (FrameworkConfig) o; + if (!other.canEqual((Object) this)) return false; + if (this.isVerboseLogging() != other.isVerboseLogging()) return false; + if (this.isCheckForUpdates() != other.isCheckForUpdates()) return false; + if (this.isDeveloperMode() != other.isDeveloperMode()) return false; + if (this.isDisableMonoMod() != other.isDisableMonoMod()) return false; + if (this.isRewriteMissing() != other.isRewriteMissing()) return false; + final Object this$ModsPath = this.getModsPath(); + final Object other$ModsPath = other.getModsPath(); + if (this$ModsPath == null ? other$ModsPath != null : !this$ModsPath.equals(other$ModsPath)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof FrameworkConfig; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + (this.isVerboseLogging() ? 79 : 97); + result = result * PRIME + (this.isCheckForUpdates() ? 79 : 97); + result = result * PRIME + (this.isDeveloperMode() ? 79 : 97); + result = result * PRIME + (this.isDisableMonoMod() ? 79 : 97); + result = result * PRIME + (this.isRewriteMissing() ? 79 : 97); + final Object $ModsPath = this.getModsPath(); + result = result * PRIME + ($ModsPath == null ? 43 : $ModsPath.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "FrameworkConfig(initial=" + this.isInitial() + ", VerboseLogging=" + this.isVerboseLogging() + ", CheckForUpdates=" + this.isCheckForUpdates() + ", DeveloperMode=" + this.isDeveloperMode() + ", DisableMonoMod=" + this.isDisableMonoMod() + ", RewriteMissing=" + this.isRewriteMissing() + ", ModsPath=" + this.getModsPath() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/HelpItem.java b/app/src/main/java/com/zane/smapiinstaller/entity/HelpItem.java index 472223b..9482f9e 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/HelpItem.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/HelpItem.java @@ -1,12 +1,9 @@ package com.zane.smapiinstaller.entity; -import lombok.Data; - /** * 帮助信息 * @author Zane */ -@Data public class HelpItem { /** * 标题 @@ -20,4 +17,102 @@ public class HelpItem { * 作者 */ private String author; + + // + @SuppressWarnings("all") + public HelpItem() { + } + + /** + * 标题 + */ + @SuppressWarnings("all") + public String getTitle() { + return this.title; + } + + /** + * 内容 + */ + @SuppressWarnings("all") + public String getContent() { + return this.content; + } + + /** + * 作者 + */ + @SuppressWarnings("all") + public String getAuthor() { + return this.author; + } + + /** + * 标题 + */ + @SuppressWarnings("all") + public void setTitle(final String title) { + this.title = title; + } + + /** + * 内容 + */ + @SuppressWarnings("all") + public void setContent(final String content) { + this.content = content; + } + + /** + * 作者 + */ + @SuppressWarnings("all") + public void setAuthor(final String author) { + this.author = author; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof HelpItem)) return false; + final HelpItem other = (HelpItem) o; + if (!other.canEqual((Object) this)) return false; + final Object this$title = this.getTitle(); + final Object other$title = other.getTitle(); + if (this$title == null ? other$title != null : !this$title.equals(other$title)) return false; + final Object this$content = this.getContent(); + final Object other$content = other.getContent(); + if (this$content == null ? other$content != null : !this$content.equals(other$content)) return false; + final Object this$author = this.getAuthor(); + final Object other$author = other.getAuthor(); + if (this$author == null ? other$author != null : !this$author.equals(other$author)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof HelpItem; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $title = this.getTitle(); + result = result * PRIME + ($title == null ? 43 : $title.hashCode()); + final Object $content = this.getContent(); + result = result * PRIME + ($content == null ? 43 : $content.hashCode()); + final Object $author = this.getAuthor(); + result = result * PRIME + ($author == null ? 43 : $author.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "HelpItem(title=" + this.getTitle() + ", content=" + this.getContent() + ", author=" + this.getAuthor() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/HelpItemList.java b/app/src/main/java/com/zane/smapiinstaller/entity/HelpItemList.java index 15511c0..6f6d7b1 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/HelpItemList.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/HelpItemList.java @@ -2,18 +2,70 @@ package com.zane.smapiinstaller.entity; import java.util.List; -import lombok.Data; -import lombok.EqualsAndHashCode; - /** * 帮助内容列表 * @author Zane */ -@Data -@EqualsAndHashCode(callSuper = true) -public class HelpItemList extends UpdatableList { +public class HelpItemList extends UpdatableList { /** * 列表 */ private List items; + + // + @SuppressWarnings("all") + public HelpItemList() { + } + + /** + * 列表 + */ + @SuppressWarnings("all") + public List getItems() { + return this.items; + } + + /** + * 列表 + */ + @SuppressWarnings("all") + public void setItems(final List items) { + this.items = items; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "HelpItemList(items=" + this.getItems() + ")"; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof HelpItemList)) return false; + final HelpItemList other = (HelpItemList) o; + if (!other.canEqual((Object) this)) return false; + if (!super.equals(o)) return false; + final Object this$items = this.getItems(); + final Object other$items = other.getItems(); + if (this$items == null ? other$items != null : !this$items.equals(other$items)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof HelpItemList; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + final Object $items = this.getItems(); + result = result * PRIME + ($items == null ? 43 : $items.hashCode()); + return result; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/ManifestEntry.java b/app/src/main/java/com/zane/smapiinstaller/entity/ManifestEntry.java index 8494c84..e66f434 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/ManifestEntry.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/ManifestEntry.java @@ -2,13 +2,10 @@ package com.zane.smapiinstaller.entity; import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - /** * 文件映射关系 * @author Zane */ -@Data public class ManifestEntry { /** * 目标路径 @@ -30,17 +27,14 @@ public class ManifestEntry { * 文件是否不属于兼容包中 */ private boolean external; - /** * 补丁CRC */ private String patchCrc; - /** * 补丁后CRC */ private String patchedCrc; - /** * 是否为高级模式补丁 */ @@ -55,4 +49,233 @@ public class ManifestEntry { */ @JsonProperty("isXABA") private boolean isXABA; + + // + @SuppressWarnings("all") + public ManifestEntry() { + } + + /** + * 目标路径 + */ + @SuppressWarnings("all") + public String getTargetPath() { + return this.targetPath; + } + + /** + * 资源路径 + */ + @SuppressWarnings("all") + public String getAssetPath() { + return this.assetPath; + } + + /** + * 压缩级别 + */ + @SuppressWarnings("all") + public int getCompression() { + return this.compression; + } + + /** + * 来源位置,0:安装器自带/1:从APK中抽取 + */ + @SuppressWarnings("all") + public int getOrigin() { + return this.origin; + } + + /** + * 文件是否不属于兼容包中 + */ + @SuppressWarnings("all") + public boolean isExternal() { + return this.external; + } + + /** + * 补丁CRC + */ + @SuppressWarnings("all") + public String getPatchCrc() { + return this.patchCrc; + } + + /** + * 补丁后CRC + */ + @SuppressWarnings("all") + public String getPatchedCrc() { + return this.patchedCrc; + } + + /** + * 是否为高级模式补丁 + */ + @SuppressWarnings("all") + public boolean isAdvanced() { + return this.advanced; + } + + /** + * 是否为XALZ压缩格式 + */ + @SuppressWarnings("all") + public boolean isXALZ() { + return this.isXALZ; + } + + /** + * 是否为XABA压缩格式 + */ + @SuppressWarnings("all") + public boolean isXABA() { + return this.isXABA; + } + + /** + * 目标路径 + */ + @SuppressWarnings("all") + public void setTargetPath(final String targetPath) { + this.targetPath = targetPath; + } + + /** + * 资源路径 + */ + @SuppressWarnings("all") + public void setAssetPath(final String assetPath) { + this.assetPath = assetPath; + } + + /** + * 压缩级别 + */ + @SuppressWarnings("all") + public void setCompression(final int compression) { + this.compression = compression; + } + + /** + * 来源位置,0:安装器自带/1:从APK中抽取 + */ + @SuppressWarnings("all") + public void setOrigin(final int origin) { + this.origin = origin; + } + + /** + * 文件是否不属于兼容包中 + */ + @SuppressWarnings("all") + public void setExternal(final boolean external) { + this.external = external; + } + + /** + * 补丁CRC + */ + @SuppressWarnings("all") + public void setPatchCrc(final String patchCrc) { + this.patchCrc = patchCrc; + } + + /** + * 补丁后CRC + */ + @SuppressWarnings("all") + public void setPatchedCrc(final String patchedCrc) { + this.patchedCrc = patchedCrc; + } + + /** + * 是否为高级模式补丁 + */ + @SuppressWarnings("all") + public void setAdvanced(final boolean advanced) { + this.advanced = advanced; + } + + /** + * 是否为XALZ压缩格式 + */ + @JsonProperty("isXALZ") + @SuppressWarnings("all") + public void setXALZ(final boolean isXALZ) { + this.isXALZ = isXALZ; + } + + /** + * 是否为XABA压缩格式 + */ + @JsonProperty("isXABA") + @SuppressWarnings("all") + public void setXABA(final boolean isXABA) { + this.isXABA = isXABA; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ManifestEntry)) return false; + final ManifestEntry other = (ManifestEntry) o; + if (!other.canEqual((Object) this)) return false; + if (this.getCompression() != other.getCompression()) return false; + if (this.getOrigin() != other.getOrigin()) return false; + if (this.isExternal() != other.isExternal()) return false; + if (this.isAdvanced() != other.isAdvanced()) return false; + if (this.isXALZ() != other.isXALZ()) return false; + if (this.isXABA() != other.isXABA()) return false; + final Object this$targetPath = this.getTargetPath(); + final Object other$targetPath = other.getTargetPath(); + if (this$targetPath == null ? other$targetPath != null : !this$targetPath.equals(other$targetPath)) return false; + final Object this$assetPath = this.getAssetPath(); + final Object other$assetPath = other.getAssetPath(); + if (this$assetPath == null ? other$assetPath != null : !this$assetPath.equals(other$assetPath)) return false; + final Object this$patchCrc = this.getPatchCrc(); + final Object other$patchCrc = other.getPatchCrc(); + if (this$patchCrc == null ? other$patchCrc != null : !this$patchCrc.equals(other$patchCrc)) return false; + final Object this$patchedCrc = this.getPatchedCrc(); + final Object other$patchedCrc = other.getPatchedCrc(); + if (this$patchedCrc == null ? other$patchedCrc != null : !this$patchedCrc.equals(other$patchedCrc)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ManifestEntry; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getCompression(); + result = result * PRIME + this.getOrigin(); + result = result * PRIME + (this.isExternal() ? 79 : 97); + result = result * PRIME + (this.isAdvanced() ? 79 : 97); + result = result * PRIME + (this.isXALZ() ? 79 : 97); + result = result * PRIME + (this.isXABA() ? 79 : 97); + final Object $targetPath = this.getTargetPath(); + result = result * PRIME + ($targetPath == null ? 43 : $targetPath.hashCode()); + final Object $assetPath = this.getAssetPath(); + result = result * PRIME + ($assetPath == null ? 43 : $assetPath.hashCode()); + final Object $patchCrc = this.getPatchCrc(); + result = result * PRIME + ($patchCrc == null ? 43 : $patchCrc.hashCode()); + final Object $patchedCrc = this.getPatchedCrc(); + result = result * PRIME + ($patchedCrc == null ? 43 : $patchedCrc.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ManifestEntry(targetPath=" + this.getTargetPath() + ", assetPath=" + this.getAssetPath() + ", compression=" + this.getCompression() + ", origin=" + this.getOrigin() + ", external=" + this.isExternal() + ", patchCrc=" + this.getPatchCrc() + ", patchedCrc=" + this.getPatchedCrc() + ", advanced=" + this.isAdvanced() + ", isXALZ=" + this.isXALZ() + ", isXABA=" + this.isXABA() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/ModManifestEntry.java b/app/src/main/java/com/zane/smapiinstaller/entity/ModManifestEntry.java index d1bd44a..0ca2613 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/ModManifestEntry.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/ModManifestEntry.java @@ -1,18 +1,14 @@ package com.zane.smapiinstaller.entity; import com.fasterxml.jackson.annotation.JsonAutoDetect; - import java.util.List; import java.util.Set; -import lombok.Data; - /** * Mod信息 * @author Zane */ -@Data -@JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.ANY, getterVisibility= JsonAutoDetect.Visibility.NONE) +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE) public class ModManifestEntry { /** * 存放位置 @@ -46,7 +42,6 @@ public class ModManifestEntry { * 资源包类型 */ private ModManifestEntry ContentPackFor; - /** * 最小依赖版本 */ @@ -55,17 +50,14 @@ public class ModManifestEntry { * 是否必须依赖 */ private Boolean IsRequired; - /** * 是否清理安装 */ private Boolean CleanInstall; - /** * 原唯一ID列表 */ private List OriginUniqueId; - /** * 翻译后的Description */ @@ -74,4 +66,323 @@ public class ModManifestEntry { * 文件修改日期 */ private transient Long lastModified; + + // + @SuppressWarnings("all") + public ModManifestEntry() { + } + + /** + * 存放位置 + */ + @SuppressWarnings("all") + public String getAssetPath() { + return this.assetPath; + } + + /** + * 名称 + */ + @SuppressWarnings("all") + public String getName() { + return this.Name; + } + + /** + * 唯一ID + */ + @SuppressWarnings("all") + public String getUniqueID() { + return this.UniqueID; + } + + /** + * 版本 + */ + @SuppressWarnings("all") + public String getVersion() { + return this.Version; + } + + /** + * 描述 + */ + @SuppressWarnings("all") + public String getDescription() { + return this.Description; + } + + /** + * 依赖 + */ + @SuppressWarnings("all") + public Set getDependencies() { + return this.Dependencies; + } + + /** + * MOD更新源 + */ + @SuppressWarnings("all") + public List getUpdateKeys() { + return this.UpdateKeys; + } + + /** + * 资源包类型 + */ + @SuppressWarnings("all") + public ModManifestEntry getContentPackFor() { + return this.ContentPackFor; + } + + /** + * 最小依赖版本 + */ + @SuppressWarnings("all") + public String getMinimumVersion() { + return this.MinimumVersion; + } + + /** + * 是否必须依赖 + */ + @SuppressWarnings("all") + public Boolean getIsRequired() { + return this.IsRequired; + } + + /** + * 是否清理安装 + */ + @SuppressWarnings("all") + public Boolean getCleanInstall() { + return this.CleanInstall; + } + + /** + * 原唯一ID列表 + */ + @SuppressWarnings("all") + public List getOriginUniqueId() { + return this.OriginUniqueId; + } + + /** + * 翻译后的Description + */ + @SuppressWarnings("all") + public String getTranslatedDescription() { + return this.translatedDescription; + } + + /** + * 文件修改日期 + */ + @SuppressWarnings("all") + public Long getLastModified() { + return this.lastModified; + } + + /** + * 存放位置 + */ + @SuppressWarnings("all") + public void setAssetPath(final String assetPath) { + this.assetPath = assetPath; + } + + /** + * 名称 + */ + @SuppressWarnings("all") + public void setName(final String Name) { + this.Name = Name; + } + + /** + * 唯一ID + */ + @SuppressWarnings("all") + public void setUniqueID(final String UniqueID) { + this.UniqueID = UniqueID; + } + + /** + * 版本 + */ + @SuppressWarnings("all") + public void setVersion(final String Version) { + this.Version = Version; + } + + /** + * 描述 + */ + @SuppressWarnings("all") + public void setDescription(final String Description) { + this.Description = Description; + } + + /** + * 依赖 + */ + @SuppressWarnings("all") + public void setDependencies(final Set Dependencies) { + this.Dependencies = Dependencies; + } + + /** + * MOD更新源 + */ + @SuppressWarnings("all") + public void setUpdateKeys(final List UpdateKeys) { + this.UpdateKeys = UpdateKeys; + } + + /** + * 资源包类型 + */ + @SuppressWarnings("all") + public void setContentPackFor(final ModManifestEntry ContentPackFor) { + this.ContentPackFor = ContentPackFor; + } + + /** + * 最小依赖版本 + */ + @SuppressWarnings("all") + public void setMinimumVersion(final String MinimumVersion) { + this.MinimumVersion = MinimumVersion; + } + + /** + * 是否必须依赖 + */ + @SuppressWarnings("all") + public void setIsRequired(final Boolean IsRequired) { + this.IsRequired = IsRequired; + } + + /** + * 是否清理安装 + */ + @SuppressWarnings("all") + public void setCleanInstall(final Boolean CleanInstall) { + this.CleanInstall = CleanInstall; + } + + /** + * 原唯一ID列表 + */ + @SuppressWarnings("all") + public void setOriginUniqueId(final List OriginUniqueId) { + this.OriginUniqueId = OriginUniqueId; + } + + /** + * 翻译后的Description + */ + @SuppressWarnings("all") + public void setTranslatedDescription(final String translatedDescription) { + this.translatedDescription = translatedDescription; + } + + /** + * 文件修改日期 + */ + @SuppressWarnings("all") + public void setLastModified(final Long lastModified) { + this.lastModified = lastModified; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ModManifestEntry)) return false; + final ModManifestEntry other = (ModManifestEntry) o; + if (!other.canEqual((Object) this)) return false; + final Object this$IsRequired = this.getIsRequired(); + final Object other$IsRequired = other.getIsRequired(); + if (this$IsRequired == null ? other$IsRequired != null : !this$IsRequired.equals(other$IsRequired)) return false; + final Object this$CleanInstall = this.getCleanInstall(); + final Object other$CleanInstall = other.getCleanInstall(); + if (this$CleanInstall == null ? other$CleanInstall != null : !this$CleanInstall.equals(other$CleanInstall)) return false; + final Object this$assetPath = this.getAssetPath(); + final Object other$assetPath = other.getAssetPath(); + if (this$assetPath == null ? other$assetPath != null : !this$assetPath.equals(other$assetPath)) return false; + final Object this$Name = this.getName(); + final Object other$Name = other.getName(); + if (this$Name == null ? other$Name != null : !this$Name.equals(other$Name)) return false; + final Object this$UniqueID = this.getUniqueID(); + final Object other$UniqueID = other.getUniqueID(); + if (this$UniqueID == null ? other$UniqueID != null : !this$UniqueID.equals(other$UniqueID)) return false; + final Object this$Version = this.getVersion(); + final Object other$Version = other.getVersion(); + if (this$Version == null ? other$Version != null : !this$Version.equals(other$Version)) return false; + final Object this$Description = this.getDescription(); + final Object other$Description = other.getDescription(); + if (this$Description == null ? other$Description != null : !this$Description.equals(other$Description)) return false; + final Object this$Dependencies = this.getDependencies(); + final Object other$Dependencies = other.getDependencies(); + if (this$Dependencies == null ? other$Dependencies != null : !this$Dependencies.equals(other$Dependencies)) return false; + final Object this$UpdateKeys = this.getUpdateKeys(); + final Object other$UpdateKeys = other.getUpdateKeys(); + if (this$UpdateKeys == null ? other$UpdateKeys != null : !this$UpdateKeys.equals(other$UpdateKeys)) return false; + final Object this$ContentPackFor = this.getContentPackFor(); + final Object other$ContentPackFor = other.getContentPackFor(); + if (this$ContentPackFor == null ? other$ContentPackFor != null : !this$ContentPackFor.equals(other$ContentPackFor)) return false; + final Object this$MinimumVersion = this.getMinimumVersion(); + final Object other$MinimumVersion = other.getMinimumVersion(); + if (this$MinimumVersion == null ? other$MinimumVersion != null : !this$MinimumVersion.equals(other$MinimumVersion)) return false; + final Object this$OriginUniqueId = this.getOriginUniqueId(); + final Object other$OriginUniqueId = other.getOriginUniqueId(); + if (this$OriginUniqueId == null ? other$OriginUniqueId != null : !this$OriginUniqueId.equals(other$OriginUniqueId)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ModManifestEntry; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $IsRequired = this.getIsRequired(); + result = result * PRIME + ($IsRequired == null ? 43 : $IsRequired.hashCode()); + final Object $CleanInstall = this.getCleanInstall(); + result = result * PRIME + ($CleanInstall == null ? 43 : $CleanInstall.hashCode()); + final Object $assetPath = this.getAssetPath(); + result = result * PRIME + ($assetPath == null ? 43 : $assetPath.hashCode()); + final Object $Name = this.getName(); + result = result * PRIME + ($Name == null ? 43 : $Name.hashCode()); + final Object $UniqueID = this.getUniqueID(); + result = result * PRIME + ($UniqueID == null ? 43 : $UniqueID.hashCode()); + final Object $Version = this.getVersion(); + result = result * PRIME + ($Version == null ? 43 : $Version.hashCode()); + final Object $Description = this.getDescription(); + result = result * PRIME + ($Description == null ? 43 : $Description.hashCode()); + final Object $Dependencies = this.getDependencies(); + result = result * PRIME + ($Dependencies == null ? 43 : $Dependencies.hashCode()); + final Object $UpdateKeys = this.getUpdateKeys(); + result = result * PRIME + ($UpdateKeys == null ? 43 : $UpdateKeys.hashCode()); + final Object $ContentPackFor = this.getContentPackFor(); + result = result * PRIME + ($ContentPackFor == null ? 43 : $ContentPackFor.hashCode()); + final Object $MinimumVersion = this.getMinimumVersion(); + result = result * PRIME + ($MinimumVersion == null ? 43 : $MinimumVersion.hashCode()); + final Object $OriginUniqueId = this.getOriginUniqueId(); + result = result * PRIME + ($OriginUniqueId == null ? 43 : $OriginUniqueId.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ModManifestEntry(assetPath=" + this.getAssetPath() + ", Name=" + this.getName() + ", UniqueID=" + this.getUniqueID() + ", Version=" + this.getVersion() + ", Description=" + this.getDescription() + ", Dependencies=" + this.getDependencies() + ", UpdateKeys=" + this.getUpdateKeys() + ", ContentPackFor=" + this.getContentPackFor() + ", MinimumVersion=" + this.getMinimumVersion() + ", IsRequired=" + this.getIsRequired() + ", CleanInstall=" + this.getCleanInstall() + ", OriginUniqueId=" + this.getOriginUniqueId() + ", translatedDescription=" + this.getTranslatedDescription() + ", lastModified=" + this.getLastModified() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/entity/UpdatableList.java b/app/src/main/java/com/zane/smapiinstaller/entity/UpdatableList.java index aa8e59c..5edd4ff 100644 --- a/app/src/main/java/com/zane/smapiinstaller/entity/UpdatableList.java +++ b/app/src/main/java/com/zane/smapiinstaller/entity/UpdatableList.java @@ -1,15 +1,65 @@ package com.zane.smapiinstaller.entity; -import lombok.Data; - /** * 可更新列表 * @author Zane */ -@Data public class UpdatableList { /** * 列表版本 */ private int version; + + // + @SuppressWarnings("all") + public UpdatableList() { + } + + /** + * 列表版本 + */ + @SuppressWarnings("all") + public int getVersion() { + return this.version; + } + + /** + * 列表版本 + */ + @SuppressWarnings("all") + public void setVersion(final int version) { + this.version = version; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof UpdatableList)) return false; + final UpdatableList other = (UpdatableList) o; + if (!other.canEqual((Object) this)) return false; + if (this.getVersion() != other.getVersion()) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof UpdatableList; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getVersion(); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "UpdatableList(version=" + this.getVersion() + ")"; + } + // } diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/ManifestTagVisitor.java b/app/src/main/java/com/zane/smapiinstaller/logic/ManifestTagVisitor.java index 7d4db78..034a89a 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/ManifestTagVisitor.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/ManifestTagVisitor.java @@ -2,15 +2,12 @@ package com.zane.smapiinstaller.logic; import java.util.List; import java.util.function.Function; - -import lombok.AllArgsConstructor; import pxb.android.axml.NodeVisitor; /** * AndroidManifest文件节点访问器 */ class ManifestTagVisitor extends NodeVisitor { - private final Function> attrProcessLogic; private final Function> childProcessLogic; @@ -25,8 +22,8 @@ class ManifestTagVisitor extends NodeVisitor { AttrArgs attrArgs = new AttrArgs(ns, name, resourceId, type, obj); List appendAttrs = attrProcessLogic.apply(attrArgs); super.attr(attrArgs.ns, attrArgs.name, attrArgs.resourceId, attrArgs.type, attrArgs.obj); - if(appendAttrs != null) { - for (AttrArgs attr: appendAttrs) { + if (appendAttrs != null) { + for (AttrArgs attr : appendAttrs) { super.attr(attr.ns, attr.name, attr.resourceId, attr.type, attr.obj); } } @@ -37,11 +34,11 @@ class ManifestTagVisitor extends NodeVisitor { ChildArgs childArgs = new ChildArgs(ns, name, null); List appendChild = childProcessLogic.apply(childArgs); NodeVisitor child = super.child(childArgs.ns, childArgs.name); - if(appendChild != null) { - for (ChildArgs c: appendChild) { + if (appendChild != null) { + for (ChildArgs c : appendChild) { NodeVisitor visitor = super.child(c.ns, c.name); - if(c.attrArgs != null) { - for (AttrArgs attr: c.attrArgs) { + if (c.attrArgs != null) { + for (AttrArgs attr : c.attrArgs) { visitor.attr(attr.ns, attr.name, attr.resourceId, attr.type, attr.obj); } } @@ -49,18 +46,40 @@ class ManifestTagVisitor extends NodeVisitor { } return new ManifestTagVisitor(child, attrProcessLogic, childProcessLogic); } - @AllArgsConstructor + + public static class ChildArgs { String ns; String name; List attrArgs; + + // + @SuppressWarnings("all") + public ChildArgs(final String ns, final String name, final List attrArgs) { + this.ns = ns; + this.name = name; + this.attrArgs = attrArgs; + } + // } - @AllArgsConstructor + + public static class AttrArgs { String ns; String name; int resourceId; int type; Object obj; + + // + @SuppressWarnings("all") + public AttrArgs(final String ns, final String name, final int resourceId, final int type, final Object obj) { + this.ns = ns; + this.name = name; + this.resourceId = resourceId; + this.type = type; + this.obj = obj; + } + // } } diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/MultiprocessingUtil.java b/app/src/main/java/com/zane/smapiinstaller/utils/MultiprocessingUtil.java index 008af9e..de7a2e5 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/MultiprocessingUtil.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/MultiprocessingUtil.java @@ -1,9 +1,7 @@ package com.zane.smapiinstaller.utils; import android.os.Build; - import com.google.common.util.concurrent.ThreadFactoryBuilder; - import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.ForkJoinPool; @@ -14,24 +12,18 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.function.Consumer; import java.util.function.Supplier; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.SneakyThrows; - /** * @author Zane */ public class MultiprocessingUtil { - public final static ExecutorService EXECUTOR_SERVICE = getExecutorService(); + public static final ExecutorService EXECUTOR_SERVICE = getExecutorService(); public static ExecutorService getExecutorService() { int processors = Runtime.getRuntime().availableProcessors(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return new ForkJoinPool(processors, ForkJoinPool.defaultForkJoinWorkerThreadFactory, null, true); } - return new ThreadPoolExecutor(processors, processors, - 0L, TimeUnit.MILLISECONDS, - new LinkedBlockingQueue<>(), new ThreadFactoryBuilder().build()); + return new ThreadPoolExecutor(processors, processors, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), new ThreadFactoryBuilder().build()); } public static TaskBundle newTaskBundle(Consumer onResult) { @@ -61,8 +53,7 @@ public class MultiprocessingUtil { return new TaskBundle<>(taskCount, doneLatch, futureResults); } - @Data - @AllArgsConstructor + public static class TaskBundle { private AtomicLong taskCount; private CountDownLatch doneLatch; @@ -79,10 +70,96 @@ public class MultiprocessingUtil { }); } - @SneakyThrows public void join() { - taskCount.decrementAndGet(); - doneLatch.await(); + try { + taskCount.decrementAndGet(); + doneLatch.await(); + } catch (final java.lang.Throwable $ex) { + throw new RuntimeException($ex); + } } + + // + @SuppressWarnings("all") + public AtomicLong getTaskCount() { + return this.taskCount; + } + + @SuppressWarnings("all") + public CountDownLatch getDoneLatch() { + return this.doneLatch; + } + + @SuppressWarnings("all") + public LinkedBlockingQueue getFutureResults() { + return this.futureResults; + } + + @SuppressWarnings("all") + public void setTaskCount(final AtomicLong taskCount) { + this.taskCount = taskCount; + } + + @SuppressWarnings("all") + public void setDoneLatch(final CountDownLatch doneLatch) { + this.doneLatch = doneLatch; + } + + @SuppressWarnings("all") + public void setFutureResults(final LinkedBlockingQueue futureResults) { + this.futureResults = futureResults; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof MultiprocessingUtil.TaskBundle)) return false; + final MultiprocessingUtil.TaskBundle other = (MultiprocessingUtil.TaskBundle) o; + if (!other.canEqual((Object) this)) return false; + final Object this$taskCount = this.getTaskCount(); + final Object other$taskCount = other.getTaskCount(); + if (this$taskCount == null ? other$taskCount != null : !this$taskCount.equals(other$taskCount)) return false; + final Object this$doneLatch = this.getDoneLatch(); + final Object other$doneLatch = other.getDoneLatch(); + if (this$doneLatch == null ? other$doneLatch != null : !this$doneLatch.equals(other$doneLatch)) return false; + final Object this$futureResults = this.getFutureResults(); + final Object other$futureResults = other.getFutureResults(); + if (this$futureResults == null ? other$futureResults != null : !this$futureResults.equals(other$futureResults)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof MultiprocessingUtil.TaskBundle; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $taskCount = this.getTaskCount(); + result = result * PRIME + ($taskCount == null ? 43 : $taskCount.hashCode()); + final Object $doneLatch = this.getDoneLatch(); + result = result * PRIME + ($doneLatch == null ? 43 : $doneLatch.hashCode()); + final Object $futureResults = this.getFutureResults(); + result = result * PRIME + ($futureResults == null ? 43 : $futureResults.hashCode()); + return result; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "MultiprocessingUtil.TaskBundle(taskCount=" + this.getTaskCount() + ", doneLatch=" + this.getDoneLatch() + ", futureResults=" + this.getFutureResults() + ")"; + } + + @SuppressWarnings("all") + public TaskBundle(final AtomicLong taskCount, final CountDownLatch doneLatch, final LinkedBlockingQueue futureResults) { + this.taskCount = taskCount; + this.doneLatch = doneLatch; + this.futureResults = futureResults; + } + // } } diff --git a/app/src/main/java/com/zane/smapiinstaller/utils/ZipUtils.java b/app/src/main/java/com/zane/smapiinstaller/utils/ZipUtils.java index 77b2546..aa71021 100644 --- a/app/src/main/java/com/zane/smapiinstaller/utils/ZipUtils.java +++ b/app/src/main/java/com/zane/smapiinstaller/utils/ZipUtils.java @@ -10,14 +10,11 @@ import com.google.common.io.ByteStreams; import com.google.common.io.Files; import com.zane.smapiinstaller.dto.AssemblyStoreAssembly; import com.zane.smapiinstaller.dto.Tuple2; - import net.fornwall.apksigner.zipio.ZioEntry; import net.fornwall.apksigner.zipio.ZipInput; import net.fornwall.apksigner.zipio.ZipOutput; import net.jpountz.lz4.LZ4Factory; - import org.bouncycastle.pqc.math.linearalgebra.ByteUtils; - import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; @@ -36,20 +33,15 @@ import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; - /** * @author Zane */ public class ZipUtils { - - private final static byte[] MAGIC_BLOB = new byte[]{'X', 'A', 'B', 'A'}; - private final static byte[] MAGIC_COMPRESSED = new byte[]{'X', 'A', 'L', 'Z'}; + private static final byte[] MAGIC_BLOB = new byte[] {'X', 'A', 'B', 'A'}; + private static final byte[] MAGIC_COMPRESSED = new byte[] {'X', 'A', 'L', 'Z'}; public static int fromBytes(byte[] bytes) { - return (bytes[0] & 0xff) | ((bytes[1] & 0xff) << 8) | ((bytes[2] & 0xff) << 16) | ((bytes[3] & 0xff) << 24); + return (bytes[0] & 255) | ((bytes[1] & 255) << 8) | ((bytes[2] & 255) << 16) | ((bytes[3] & 255) << 24); } public static byte[] decompressXALZ(byte[] bytes) { @@ -58,16 +50,14 @@ public class ZipUtils { } if (Arrays.equals(ByteUtils.subArray(bytes, 0, 4), MAGIC_COMPRESSED)) { byte[] length = ByteUtils.subArray(bytes, 8, 12); - int len = (length[0] & 0xff) | ((length[1] & 0xff) << 8) | ((length[2] & 0xff) << 16) | ((length[3] & 0xff) << 24); + int len = (length[0] & 255) | ((length[1] & 255) << 8) | ((length[2] & 255) << 16) | ((length[3] & 255) << 24); bytes = LZ4Factory.fastestJavaInstance().fastDecompressor().decompress(bytes, 12, len); } return bytes; } - public static Map unpackXABA(byte[] manifestBytes, byte[] xabaBytes) { - List> manifest = Splitter.on('\n').omitEmptyStrings().splitToList(new String(manifestBytes, StandardCharsets.UTF_8)) - .stream().skip(1).map(line -> Splitter.on(CharMatcher.whitespace()).omitEmptyStrings().splitToList(line)).collect(Collectors.toList()); + List> manifest = Splitter.on('\n').omitEmptyStrings().splitToList(new String(manifestBytes, StandardCharsets.UTF_8)).stream().skip(1).map(line -> Splitter.on(CharMatcher.whitespace()).omitEmptyStrings().splitToList(line)).collect(Collectors.toList()); ByteSource source = ByteSource.wrap(xabaBytes); Map result = new HashMap<>(); try { @@ -101,13 +91,11 @@ public class ZipUtils { assembly.setConfigDataOffset(fromBytes(buffer)); buffer = source.slice(offset += 4, 4).read(); assembly.setConfigDataSize(fromBytes(buffer)); - buffer = source.slice(assembly.getDataOffset(), 4).read(); byte[] bytes; if (Arrays.equals(buffer, MAGIC_COMPRESSED)) { byte[] lzBytes = source.slice(assembly.getDataOffset(), assembly.getDataSize()).read(); bytes = decompressXALZ(lzBytes); - } else { bytes = source.slice(assembly.getDataOffset(), assembly.getDataSize()).read(); } @@ -133,7 +121,7 @@ public class ZipUtils { AtomicLong count = new AtomicLong(); int reportInterval = size / 100; ConcurrentHashMap replacedFileSet = new ConcurrentHashMap<>(entryMap.size()); - MultiprocessingUtil.TaskBundle taskBundle = MultiprocessingUtil.newTaskBundle((zioEntry) -> { + MultiprocessingUtil.TaskBundle taskBundle = MultiprocessingUtil.newTaskBundle(zioEntry -> { try { zipOutput.write(zioEntry); long index = count.incrementAndGet(); @@ -175,7 +163,7 @@ public class ZipUtils { taskBundle.join(); Sets.SetView difference = Sets.difference(entryMap.keySet(), replacedFileSet.keySet()); count.set(0); - taskBundle = MultiprocessingUtil.newTaskBundle((zioEntry) -> { + taskBundle = MultiprocessingUtil.newTaskBundle(zioEntry -> { try { zipOutput.write(zioEntry); long index = count.incrementAndGet(); @@ -203,7 +191,7 @@ public class ZipUtils { for (String resourcePack : resourcePacks) { try (ZipInput input = new ZipInput(resourcePack)) { for (ZioEntry inEntry : input.entries.values()) { - if(inEntry.getName().startsWith("assets/Content")) { + if (inEntry.getName().startsWith("assets/Content")) { ZioEntry zioEntry = new ZioEntry(inEntry.getName()); zioEntry.setCompression(inEntry.getCompression()); try (InputStream inputStream = inEntry.getInputStream()) { @@ -250,9 +238,7 @@ public class ZipUtils { } } - @Data - @AllArgsConstructor - @EqualsAndHashCode(of = "path") + public static class ZipEntrySource { private String path; private int compressionMethod; @@ -270,5 +256,78 @@ public class ZipUtils { } return null; } + + // + @SuppressWarnings("all") + public String getPath() { + return this.path; + } + + @SuppressWarnings("all") + public int getCompressionMethod() { + return this.compressionMethod; + } + + @SuppressWarnings("all") + public Supplier getDataSupplier() { + return this.dataSupplier; + } + + @SuppressWarnings("all") + public void setPath(final String path) { + this.path = path; + } + + @SuppressWarnings("all") + public void setCompressionMethod(final int compressionMethod) { + this.compressionMethod = compressionMethod; + } + + @SuppressWarnings("all") + public void setDataSupplier(final Supplier dataSupplier) { + this.dataSupplier = dataSupplier; + } + + @Override + @SuppressWarnings("all") + public String toString() { + return "ZipUtils.ZipEntrySource(path=" + this.getPath() + ", compressionMethod=" + this.getCompressionMethod() + ", dataSupplier=" + this.getDataSupplier() + ")"; + } + + @SuppressWarnings("all") + public ZipEntrySource(final String path, final int compressionMethod, final Supplier dataSupplier) { + this.path = path; + this.compressionMethod = compressionMethod; + this.dataSupplier = dataSupplier; + } + + @Override + @SuppressWarnings("all") + public boolean equals(final Object o) { + if (o == this) return true; + if (!(o instanceof ZipUtils.ZipEntrySource)) return false; + final ZipUtils.ZipEntrySource other = (ZipUtils.ZipEntrySource) o; + if (!other.canEqual((Object) this)) return false; + final Object this$path = this.getPath(); + final Object other$path = other.getPath(); + if (this$path == null ? other$path != null : !this$path.equals(other$path)) return false; + return true; + } + + @SuppressWarnings("all") + protected boolean canEqual(final Object other) { + return other instanceof ZipUtils.ZipEntrySource; + } + + @Override + @SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $path = this.getPath(); + result = result * PRIME + ($path == null ? 43 : $path.hashCode()); + return result; + } + // } }