langtools/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java
changeset 15356 cf312dc54c60
parent 14451 c18762e096ae
child 15709 95a659644d2e
equal deleted inserted replaced
15355:a4757c33cae9 15356:cf312dc54c60
     1 /*
     1 /*
     2  * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    32 import javax.tools.JavaCompiler.CompilationTask;
    32 import javax.tools.JavaCompiler.CompilationTask;
    33 
    33 
    34 public class Helper {
    34 public class Helper {
    35 
    35 
    36     enum ContentVars {
    36     enum ContentVars {
    37         IMPORTCONTAINERSTMTS("\nimport java.lang.annotation.ContainedBy;\n" +
    37         IMPORTCONTAINERSTMTS("\nimport java.lang.annotation.Repeatable;\n"),
    38                             "\nimport java.lang.annotation.ContainerFor;\n"),
       
    39         IMPORTDEPRECATED("import java.lang.Deprecated;\n"),
    38         IMPORTDEPRECATED("import java.lang.Deprecated;\n"),
    40         IMPORTDOCUMENTED("import java.lang.annotation.Documented;\n"),
    39         IMPORTDOCUMENTED("import java.lang.annotation.Documented;\n"),
    41         IMPORTINHERITED("import java.lang.annotation.Inherited;\n"),
    40         IMPORTINHERITED("import java.lang.annotation.Inherited;\n"),
    42         IMPORTRETENTION("import java.lang.annotation.Retention;\n" +
    41         IMPORTRETENTION("import java.lang.annotation.Retention;\n" +
    43                         "\nimport java.lang.annotation.RetentionPolicy;\n"),
    42                         "\nimport java.lang.annotation.RetentionPolicy;\n"),
    44         CONTAINEDBY("\n@ContainedBy(FooContainer.class)\n"),
    43         REPEATABLE("\n@Repeatable(FooContainer.class)\n"),
    45         CONTAINERFOR("@ContainerFor(Foo.class)\n"),
       
    46         CONTAINER("@interface FooContainer {\n" +"  Foo[] value();\n}\n"),
    44         CONTAINER("@interface FooContainer {\n" +"  Foo[] value();\n}\n"),
    47         BASE("@interface Foo {}\n"),
    45         BASE("@interface Foo {}\n"),
    48         REPEATABLEANNO("\n@Foo() @Foo()"),
    46         REPEATABLEANNO("\n@Foo() @Foo()"),
    49         DEPRECATED("\n@Deprecated"),
    47         DEPRECATED("\n@Deprecated"),
    50         DOCUMENTED("\n@Documented"),
    48         DOCUMENTED("\n@Documented"),