Skip to content

Commit

Permalink
Merge pull request #11 from csowada/null-annotation-feature-1
Browse files Browse the repository at this point in the history
Null annotation feature 1
  • Loading branch information
csowada committed Dec 12, 2020
2 parents 91f7045 + 9cac542 commit 253fc89
Show file tree
Hide file tree
Showing 116 changed files with 1,725 additions and 934 deletions.
3 changes: 3 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="annotationpath" value="/de.csdev.ebus/annotations"/>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="annotationpath" value="/de.csdev.ebus/annotations"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand Down
1 change: 0 additions & 1 deletion .project
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
15 changes: 10 additions & 5 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
Expand All @@ -16,6 +16,8 @@ org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
Expand Down Expand Up @@ -56,14 +58,14 @@ org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
Expand All @@ -77,8 +79,10 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
Expand All @@ -91,6 +95,7 @@ org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
Expand All @@ -108,5 +113,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions annotations/java/lang/Class.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class java/lang/Class
getResource
(Ljava/lang/String;)Ljava/net/URL;
(Ljava/lang/String;)L0java/net/URL;
4 changes: 4 additions & 0 deletions annotations/java/lang/String.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class java/lang/String
format
(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
(Ljava/lang/String;[Ljava/lang/Object;)L1java/lang/String;
4 changes: 4 additions & 0 deletions annotations/java/lang/StringBuilder.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class java/lang/StringBuilder
toString
()Ljava/lang/String;
()L1java/lang/String;
4 changes: 4 additions & 0 deletions annotations/java/lang/reflect/Field.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class java/lang/reflect/Field
getAnnotation
<T::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TT;>;)TT;
<T::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TT;>;)T0T;
13 changes: 13 additions & 0 deletions annotations/java/math/BigDecimal.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class java/math/BigDecimal
ZERO
Ljava/math/BigDecimal;
L1java/math/BigDecimal;
add
(Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
(Ljava/math/BigDecimal;)L1java/math/BigDecimal;
setScale
(ILjava/math/RoundingMode;)Ljava/math/BigDecimal;
(ILjava/math/RoundingMode;)L1java/math/BigDecimal;
valueOf
(J)Ljava/math/BigDecimal;
(J)L1java/math/BigDecimal;
10 changes: 10 additions & 0 deletions annotations/java/util/Collections.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class java/util/Collections
emptyMap
<K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/Map<TK;TV;>;
<K:Ljava/lang/Object;V:Ljava/lang/Object;>()L1java/util/Map<TK;TV;>;
unmodifiableCollection
<T:Ljava/lang/Object;>(Ljava/util/Collection<+TT;>;)Ljava/util/Collection<TT;>;
<T:Ljava/lang/Object;>(Ljava/util/Collection<+TT;>;)L1java/util/Collection<TT;>;
unmodifiableMap
<K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<+TK;+TV;>;)Ljava/util/Map<TK;TV;>;
<K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<+TK;+TV;>;)L1java/util/Map<TK;TV;>;
4 changes: 4 additions & 0 deletions annotations/java/util/Objects.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class java/util/Objects
requireNonNull
<T:Ljava/lang/Object;>(TT;)TT;
<1T:Ljava/lang/Object;>(TT;)T1T;
4 changes: 4 additions & 0 deletions annotations/org/slf4j/LoggerFactory.eea
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class org/slf4j/LoggerFactory
getLogger
(Ljava/lang/Class<*>;)Lorg/slf4j/Logger;
(Ljava/lang/Class<*>;)L1org/slf4j/Logger;
36 changes: 25 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
<description>eBUS core library - This library handles the communication with heating engineering via the BUS specification. This protocol is used by many heating manufacturers in Europe.</description>
<groupId>de.cs-dev.ebus</groupId>
<artifactId>ebus-core</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>1.1.0</version>
<url>https://github.com/csowada/ebus</url>
<packaging>bundle</packaging>

<properties>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<license.year>2020</license.year>
<bundle.version>1.0.8.${maven.build.timestamp}</bundle.version>
</properties>
<properties>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<license.year>2020</license.year>
<bundle.version>1.1.0.${maven.build.timestamp}</bundle.version>
</properties>

<organization>
<name>Christian Sowada</name>
Expand Down Expand Up @@ -91,8 +92,8 @@
<Bundle-Version>${bundle.version}</Bundle-Version>
<Export-Package>de.csdev.ebus.*</Export-Package>
<opt>resolution:=optional</opt>
<Import-Package>org.slf4j;$[opt], com.fazecast.jSerialComm;$[opt], gnu.io;$[opt], *</Import-Package>
<Import-Package>org.slf4j;$[opt], com.fazecast.jSerialComm;$[opt], gnu.io;$[opt], org.eclipse.jdt.annotation;$[opt], *</Import-Package>

<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
<Build-Commit>${buildNumber}</Build-Commit>
<Build-Branch>${scmBranch}</Build-Branch>
Expand Down Expand Up @@ -248,38 +249,51 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.neuronrobotics</groupId>
<artifactId>nrjavaserial</artifactId>
<version>3.12.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.fazecast</groupId>
<artifactId>jSerialComm</artifactId>
<version>2.5.3</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
<version>2.2.600</version>
<scope>provided</scope>
</dependency>

</dependencies>
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/de/csdev/ebus/cfg/IEBusConfigurationProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,37 @@
import java.io.InputStream;
import java.util.List;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

/**
* @author Christian Sowada - Initial contribution
*
*/
@NonNullByDefault
public interface IEBusConfigurationProvider {

/**
* Returns a list with all configuration ids
*
* @return
* @return Returns a list with all configuration ids
*/
public List<String> getConfigurationIds();

/**
* Returns a configuration label for an id or null if not existent.
*
* @param configurationId
* @return
* @return Returns a configuration label for an id or null if not existent.
*/
public String getConfigurationLabel(String configurationId);
public @Nullable String getConfigurationLabel(String configurationId);

/**
* Returns the input stream for a configuration id or null if not existent.
*
*
* @param configurationId
* @return
* @return Returns the input stream for a configuration id or null if not existent.
*/
public InputStream getConfigurationStream(String configurationId);
public @Nullable InputStream getConfigurationStream(String configurationId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
import java.net.URL;
import java.util.List;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

import de.csdev.ebus.command.IEBusCommandCollection;
import de.csdev.ebus.command.datatypes.EBusTypeRegistry;

/**
* @author Christian Sowada - Initial contribution
*
*/
@NonNullByDefault
public interface IEBusConfigurationReader {

/**
Expand All @@ -36,7 +40,7 @@ public interface IEBusConfigurationReader {
* @throws EBusConfigurationReaderException
* @throws IOException
*/
public IEBusCommandCollection loadConfigurationCollection(URL url)
public @Nullable IEBusCommandCollection loadConfigurationCollection(URL url)
throws EBusConfigurationReaderException, IOException;

/**
Expand Down
Loading

0 comments on commit 253fc89

Please sign in to comment.