Skip to content

Commit

Permalink
wip. type annotation support.
Browse files Browse the repository at this point in the history
  • Loading branch information
elucash committed Dec 31, 2014
1 parent be490e1 commit f1a4b19
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions value-fixture/src/org/immutables/fixture/HasTypeAnnotation.java
Expand Up @@ -15,20 +15,24 @@
*/
package org.immutables.fixture;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.util.Map;

import javax.annotation.Nullable;

import org.example.TypeA;
import org.example.TypeB;
import org.immutables.value.Json;
import org.immutables.value.Value;

@Target(ElementType.TYPE_USE)
@interface TypeA {}

@Target(ElementType.TYPE_USE)
@interface TypeB {}

@Value.Immutable
@Json.Marshaled
public abstract class HasTypeAnnotation {
@Nullable
public abstract @TypeA @TypeB String str();
@Nullable
public abstract @TypeA @TypeB Map<String, String> map();
public abstract @TypeA @TypeB Map<@TypeA String, @TypeB String> map();
}

0 comments on commit f1a4b19

Please sign in to comment.