Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'next' into dataelement-proxy-test
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <bluhmdj@ornl.gov>
  • Loading branch information
dbluhm committed Jul 6, 2020
2 parents faa0ed0 + 6850ae9 commit dd16ace
Show file tree
Hide file tree
Showing 39 changed files with 686 additions and 6 deletions.
6 changes: 6 additions & 0 deletions org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/pom.xml
Expand Up @@ -85,6 +85,12 @@
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.testing.compile</groupId>
<artifactId>compile-testing</artifactId>
<version>0.18</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
Expand Down
Expand Up @@ -47,7 +47,7 @@
"org.eclipse.ice.dev.annotations.DataField.Default",
"org.eclipse.ice.dev.annotations.Persisted"
})
@SupportedSourceVersion(SourceVersion.RELEASE_8)
@SupportedSourceVersion(SourceVersion.RELEASE_11)
@AutoService(Processor.class)
public class DataElementProcessor extends AbstractProcessor {

Expand Down
Expand Up @@ -7,6 +7,7 @@
import java.util.stream.Collectors;

import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;

Expand Down Expand Up @@ -73,7 +74,7 @@ public class DataElementSpec extends AnnotatedElement {
*/
public DataElementSpec(Element element, Elements elementUtils) throws InvalidDataElementSpec {
super(element, elementUtils);
if (!element.getKind().isClass()) {
if (element.getKind() != ElementKind.CLASS) {
throw new InvalidDataElementSpec(
"DataElementSpec must be class, found " + element.toString()
);
Expand Down
Expand Up @@ -134,6 +134,7 @@ public class ${class} implements ${interface}, Serializable {
// by debuggers.
#foreach($field in ${fields.Match})

// Matching ${field.Name}
boolean ${field.Name}Match =
#if(${field.Nullable})
this.${field.Name} == null ?
Expand All @@ -144,8 +145,6 @@ public class ${class} implements ${interface}, Serializable {
#else
this.${field.Name}.equals(other.${field.Name});
#end## if nullable
#else
// Not checking ${field.Name}
#end## foreach

retval =
Expand Down
Expand Up @@ -18,7 +18,7 @@ public interface $interface extends IDataElement<${interface}> {
* Get ${field.Name}.
* @return ${field.Name}
*/
public #fieldtype get${field.NameForMethod}();
public #fieldtype #getterprefix${field.NameForMethod}();
#end## if Getter
#if(${field.Setter})

Expand Down
Expand Up @@ -36,4 +36,5 @@ $shift$bodyContent.toString().replace("$tab", "").replace("$newline", "$newline$
* $field.DocString.trim().replace("$newline", "$newline$tab *")
*/
#end
#end
#end
#macro(getterprefix)#if(${field.Type} == "boolean")is#{else}get#end#end

0 comments on commit dd16ace

Please sign in to comment.