mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Declare fields at the top of the class
Improve Codacy PR quality requirements: Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.
This commit is contained in:
parent
488388050e
commit
b40f54af06
@ -44,61 +44,59 @@ import cc.arduino.contributions.VersionHelper;
|
||||
public class ContributedLibrary extends DownloadableContribution {
|
||||
|
||||
private String url;
|
||||
private String version;
|
||||
private String checksum;
|
||||
private long size;
|
||||
private String archiveFileName;
|
||||
private String name;
|
||||
private String maintainer;
|
||||
private String author;
|
||||
private String website;
|
||||
private String category;
|
||||
private String licence;
|
||||
private String paragraph;
|
||||
private String sentence;
|
||||
private ArrayList<String> architectures;
|
||||
private ArrayList<String> types;
|
||||
private ArrayList<ContributedLibraryDependency> dependencies;
|
||||
private ArrayList<String> providesIncludes;
|
||||
|
||||
public String getUrl() { return url; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
private String checksum;
|
||||
public String getChecksum() { return checksum; }
|
||||
|
||||
private long size;
|
||||
public long getSize() { return size; }
|
||||
|
||||
private String archiveFileName;
|
||||
public String getArchiveFileName() { return archiveFileName; }
|
||||
|
||||
|
||||
|
||||
private String name;
|
||||
public String getName() { return name; }
|
||||
|
||||
private String maintainer;
|
||||
public String getMaintainer() { return maintainer; }
|
||||
|
||||
private String author;
|
||||
public String getAuthor() { return author; }
|
||||
|
||||
private String website;
|
||||
public String getWebsite() { return website; }
|
||||
|
||||
private String category;
|
||||
public String getCategory() { return category; }
|
||||
|
||||
public void setCategory(String category) { this.category = category; }
|
||||
|
||||
private String licence;
|
||||
public String getLicense() { return licence; }
|
||||
|
||||
private String paragraph;
|
||||
public String getParagraph() { return paragraph; }
|
||||
|
||||
private String sentence;
|
||||
public String getSentence() { return sentence; }
|
||||
|
||||
private ArrayList<String> architectures;
|
||||
public List<String> getArchitectures() { return architectures; }
|
||||
|
||||
private ArrayList<String> types;
|
||||
public List<String> getTypes() { return types; }
|
||||
|
||||
private ArrayList<ContributedLibraryDependency> dependencies;
|
||||
public List<ContributedLibraryDependency> getDependencies() { return dependencies; }
|
||||
|
||||
private ArrayList<String> providesIncludes;
|
||||
public List<String> getProvidesIncludes() { return providesIncludes; }
|
||||
|
||||
|
||||
|
||||
public static final Comparator<ContributedLibrary> CASE_INSENSITIVE_ORDER = (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName());
|
||||
|
||||
private Optional<UserLibrary> installedLib = Optional.empty();
|
||||
|
@ -32,9 +32,10 @@ package cc.arduino.contributions.libraries;
|
||||
public class ContributedLibraryDependency {
|
||||
|
||||
private String name;
|
||||
private String version;
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
@Override
|
||||
|
@ -35,28 +35,28 @@ import java.util.List;
|
||||
public class ContributedPackage {
|
||||
|
||||
private String name;
|
||||
private String maintainer;
|
||||
private String websiteURL;
|
||||
private String email;
|
||||
private ArrayList<ContributedPlatform> platforms = new ArrayList<ContributedPlatform>();
|
||||
private ArrayList<ContributedTool> tools = new ArrayList<ContributedTool>();
|
||||
private ContributedHelp help;
|
||||
private boolean trusted;
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
private String maintainer;
|
||||
public String getMaintainer() { return maintainer; }
|
||||
|
||||
private String websiteURL;
|
||||
public String getWebsiteURL() { return websiteURL; }
|
||||
|
||||
private String email;
|
||||
public String getEmail() { return email; }
|
||||
|
||||
private ArrayList<ContributedPlatform> platforms = new ArrayList<ContributedPlatform>();
|
||||
public List<ContributedPlatform> getPlatforms() { return platforms; }
|
||||
|
||||
private ArrayList<ContributedTool> tools = new ArrayList<ContributedTool>();
|
||||
public List<ContributedTool> getTools() { return tools; }
|
||||
|
||||
private ContributedHelp help;
|
||||
public ContributedHelp getHelp() { return help; }
|
||||
|
||||
private boolean trusted;
|
||||
|
||||
public ContributedPlatform findPlatform(String architecture, String version) {
|
||||
if (architecture == null || version == null) {
|
||||
return null;
|
||||
|
@ -38,42 +38,47 @@ import java.util.*;
|
||||
public class ContributedPlatform extends DownloadableContribution {
|
||||
|
||||
private String url;
|
||||
private String version;
|
||||
private long size;
|
||||
private String archiveFileName;
|
||||
private String name;
|
||||
private String category;
|
||||
private String architecture;
|
||||
private String checksum;
|
||||
private ArrayList<ContributedToolReference> toolsDependencies = new ArrayList<ContributedToolReference>();
|
||||
private ArrayList<ContributedBoard> boards = new ArrayList<ContributedBoard>();
|
||||
private ContributedHelp help;
|
||||
private boolean installed;
|
||||
private File installedFolder;
|
||||
private boolean builtIn;
|
||||
private Map<ContributedToolReference, ContributedTool> resolvedToolReferences;
|
||||
private ContributedPackage parentPackage;
|
||||
|
||||
public String getUrl() { return url; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
private long size;
|
||||
public long getSize() { return size; }
|
||||
|
||||
private String archiveFileName;
|
||||
public String getArchiveFileName() { return archiveFileName; }
|
||||
|
||||
private String name;
|
||||
public String getName() { return name; }
|
||||
|
||||
private String category;
|
||||
public String getCategory() { return category; }
|
||||
|
||||
public void setCategory(String category) { this.category = category; }
|
||||
|
||||
private String architecture;
|
||||
public String getArchitecture() { return architecture; }
|
||||
|
||||
private String checksum;
|
||||
@Override
|
||||
public String getChecksum() { return checksum; }
|
||||
|
||||
private ArrayList<ContributedToolReference> toolsDependencies = new ArrayList<ContributedToolReference>();
|
||||
public List<ContributedToolReference> getToolsDependencies() { return toolsDependencies; }
|
||||
|
||||
private ArrayList<ContributedBoard> boards = new ArrayList<ContributedBoard>();
|
||||
public List<ContributedBoard> getBoards() { return boards; }
|
||||
|
||||
private ContributedHelp help;
|
||||
public ContributedHelp getHelp() { return help; }
|
||||
|
||||
private boolean installed;
|
||||
|
||||
public boolean isInstalled() {
|
||||
return installed;
|
||||
}
|
||||
@ -82,8 +87,6 @@ public class ContributedPlatform extends DownloadableContribution {
|
||||
this.installed = installed;
|
||||
}
|
||||
|
||||
private File installedFolder;
|
||||
|
||||
public File getInstalledFolder() {
|
||||
return installedFolder;
|
||||
}
|
||||
@ -92,8 +95,6 @@ public class ContributedPlatform extends DownloadableContribution {
|
||||
this.installedFolder = installedFolder;
|
||||
}
|
||||
|
||||
private boolean builtIn;
|
||||
|
||||
public boolean isBuiltIn() {
|
||||
return builtIn;
|
||||
}
|
||||
@ -108,10 +109,6 @@ public class ContributedPlatform extends DownloadableContribution {
|
||||
return px - py;
|
||||
};
|
||||
|
||||
private Map<ContributedToolReference, ContributedTool> resolvedToolReferences;
|
||||
|
||||
private ContributedPackage parentPackage;
|
||||
|
||||
public List<ContributedTool> getResolvedTools() {
|
||||
return new LinkedList<>(resolvedToolReferences.values());
|
||||
}
|
||||
|
@ -39,16 +39,19 @@ import java.util.List;
|
||||
public class ContributedTool {
|
||||
|
||||
private String name;
|
||||
private String version;
|
||||
private ArrayList<HostDependentDownloadableContribution> systems = new ArrayList<HostDependentDownloadableContribution>();
|
||||
private boolean installed;
|
||||
private File installedFolder;
|
||||
private boolean builtIn;
|
||||
private ContributedPackage contributedPackage;
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
private ArrayList<HostDependentDownloadableContribution> systems = new ArrayList<HostDependentDownloadableContribution>();
|
||||
public List<HostDependentDownloadableContribution> getSystems() { return systems; }
|
||||
|
||||
private boolean installed;
|
||||
|
||||
public boolean isInstalled() {
|
||||
return installed;
|
||||
}
|
||||
@ -57,8 +60,6 @@ public class ContributedTool {
|
||||
this.installed = installed;
|
||||
}
|
||||
|
||||
private File installedFolder;
|
||||
|
||||
public File getInstalledFolder() {
|
||||
return installedFolder;
|
||||
}
|
||||
@ -67,8 +68,6 @@ public class ContributedTool {
|
||||
this.installedFolder = installedFolder;
|
||||
}
|
||||
|
||||
private boolean builtIn;
|
||||
|
||||
public boolean isBuiltIn() {
|
||||
return builtIn;
|
||||
}
|
||||
@ -77,8 +76,6 @@ public class ContributedTool {
|
||||
this.builtIn = builtIn;
|
||||
}
|
||||
|
||||
private ContributedPackage contributedPackage;
|
||||
|
||||
public ContributedPackage getPackage() {
|
||||
return contributedPackage;
|
||||
}
|
||||
|
@ -34,12 +34,13 @@ import java.util.Collection;
|
||||
public class ContributedToolReference {
|
||||
|
||||
private String name;
|
||||
private String version;
|
||||
private String packager;
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
private String packager;
|
||||
public String getPackager() { return packager; }
|
||||
|
||||
public ContributedTool resolve(Collection<ContributedPackage> packages) {
|
||||
|
@ -35,21 +35,22 @@ import processing.app.Platform;
|
||||
public class HostDependentDownloadableContribution extends DownloadableContribution {
|
||||
|
||||
private String url;
|
||||
private String version;
|
||||
private String checksum;
|
||||
private long size;
|
||||
private String archiveFileName;
|
||||
private String host;
|
||||
|
||||
public String getUrl() { return url; }
|
||||
|
||||
private String version;
|
||||
public String getVersion() { return version; }
|
||||
|
||||
private String checksum;
|
||||
public String getChecksum() { return checksum; }
|
||||
|
||||
private long size;
|
||||
public long getSize() { return size; }
|
||||
|
||||
private String archiveFileName;
|
||||
public String getArchiveFileName() { return archiveFileName; }
|
||||
|
||||
private String host;
|
||||
public String getHost() { return host; }
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user