-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathImmutable.java
More file actions
27 lines (24 loc) · 1.16 KB
/
Immutable.java
File metadata and controls
27 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package qual;
import org.checkerframework.framework.qual.DefaultFor;
import org.checkerframework.framework.qual.QualifierForLiterals;
import org.checkerframework.framework.qual.LiteralKind;
import org.checkerframework.framework.qual.SubtypeOf;
import org.checkerframework.framework.qual.TypeKind;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.math.BigDecimal;
import java.math.BigInteger;
@SubtypeOf({Readonly.class})
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@DefaultFor(types={Enum.class, String.class, Double.class, Boolean.class, Byte.class,
Character.class, Float.class, Integer.class, Long.class, Short.class, Number.class,
BigDecimal.class, BigInteger.class},
typeKinds = { TypeKind.INT, TypeKind.BYTE, TypeKind.SHORT, TypeKind.BOOLEAN,
TypeKind.LONG, TypeKind.CHAR, TypeKind.FLOAT, TypeKind.DOUBLE })
@QualifierForLiterals({ LiteralKind.PRIMITIVE, LiteralKind.STRING})
public @interface Immutable {}