Skip to content

Commit

Permalink
[lang] Add more known immutable types.
Browse files Browse the repository at this point in the history
see #1013

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Aug 18, 2020
1 parent 772f713 commit 4424a12
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package io.sarl.lang.typesystem;

import java.io.File;
import java.lang.annotation.Annotation;
import java.net.InetAddress;
import java.net.URI;
import java.net.URL;
Expand Down Expand Up @@ -54,6 +55,8 @@
import org.eclipse.xtext.util.Pair;
import org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference;

import io.sarl.lang.core.Event;

/**
* Tool for validating the types against their immutability.
*
Expand All @@ -78,6 +81,7 @@ public class DefaultImmutableTypeValidator implements IImmutableTypeValidator {
UUID.class,
URL.class,
URI.class,
Annotation.class,
Enum.class,
Byte.class,
Short.class,
Expand Down Expand Up @@ -108,6 +112,9 @@ public class DefaultImmutableTypeValidator implements IImmutableTypeValidator {
ZonedDateTime.class,
ZoneId.class,
ZoneOffset.class,
Pair.class,
org.eclipse.xtext.xbase.lib.Pair.class,
Event.class,
};

/** List of the annotations that are known to mark the types as immutable.
Expand Down

0 comments on commit 4424a12

Please sign in to comment.