You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DistributedAnnotationFactory.java 1.9 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. import com.sun.mirror.apt.AnnotationProcessorFactory;
  19. import com.sun.mirror.apt.AnnotationProcessor;
  20. import com.sun.mirror.apt.AnnotationProcessorEnvironment;
  21. import java.util.Collection;
  22. import java.util.Set;
  23. import java.util.Arrays;
  24. import java.util.Collections;
  25. /**
  26. * This was the first piece of Java1.5 code in the source tree.
  27. * @since 20050-03-09T21:29:25Z
  28. */
  29. public class DistributedAnnotationFactory implements AnnotationProcessorFactory {
  30. private static final Collection<String> supportedAnnotations
  31. = Collections.unmodifiableCollection(Arrays.asList("*"));
  32. public Collection<String> supportedOptions() {
  33. return Collections.emptySet();
  34. }
  35. public Collection<String> supportedAnnotationTypes() {
  36. return supportedAnnotations;
  37. }
  38. public AnnotationProcessor getProcessorFor(
  39. Set<com.sun.mirror.declaration.AnnotationTypeDeclaration> annotationTypeDeclarations,
  40. AnnotationProcessorEnvironment env) {
  41. return new DistributedAnnotationProcessor(env);
  42. }
  43. }