test/tools/javac/processing/filer/TestGetResource.java

changeset 699
d2aaaec153e8
parent 554
9d9f26857129
child 1466
b52a38d4536c
     1.1 --- a/test/tools/javac/processing/filer/TestGetResource.java	Wed Sep 29 14:01:37 2010 -0700
     1.2 +++ b/test/tools/javac/processing/filer/TestGetResource.java	Wed Sep 29 23:27:57 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -26,7 +26,8 @@
    1.11   * @bug 6380018 6449798
    1.12   * @summary Test Filer.getResource
    1.13   * @author  Joseph D. Darcy
    1.14 - * @build TestGetResource
    1.15 + * @library ../../lib
    1.16 + * @build  JavacTestingAbstractProcessor TestGetResource
    1.17   * @compile -processor TestGetResource -proc:only -Aphase=write TestGetResource.java
    1.18   * @compile -processor TestGetResource -proc:only -Aphase=read  TestGetResource.java
    1.19   */
    1.20 @@ -49,13 +50,8 @@
    1.21   * first run of the annotation processor, write out a resource file
    1.22   * and on the second run read it in.
    1.23   */
    1.24 -@SupportedAnnotationTypes("*")
    1.25  @SupportedOptions("phase")
    1.26 -public class TestGetResource extends AbstractProcessor {
    1.27 -    private Messager messager;
    1.28 -    private Filer filer;
    1.29 -    private Map<String,String> options;
    1.30 -
    1.31 +public class TestGetResource extends JavacTestingAbstractProcessor {
    1.32      private static String CONTENTS = "Hello World.";
    1.33      private static String PKG = "";
    1.34      private static String RESOURCE_NAME = "Resource1";
    1.35 @@ -92,15 +88,4 @@
    1.36          }
    1.37          return false;
    1.38      }
    1.39 -
    1.40 -    public SourceVersion getSupportedSourceVersion() {
    1.41 -        return SourceVersion.latest();
    1.42 -    }
    1.43 -
    1.44 -    public void init(ProcessingEnvironment processingEnv) {
    1.45 -        super.init(processingEnv);
    1.46 -        messager = processingEnv.getMessager();
    1.47 -        filer    = processingEnv.getFiler();
    1.48 -        options  = processingEnv.getOptions();
    1.49 -    }
    1.50  }

mercurial