All Downloads are FREE. Search and download functionalities are using the official Maven repository.

te.rewrite-java-test.8.33.1.source-code.JavaTypeGoat Maven / Gradle / Ivy

There is a newer version: 8.35.4
Show newest version
/*
 * Copyright 2021 the original author or authors.
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* https://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openrewrite.java; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; // Whenever this class is changed, make a corresponding change in JavaTypeGoat in the main java source set. @AnnotationWithRuntimeRetention @AnnotationWithSourceRetention public abstract class JavaTypeGoat & C> { public static final PT parameterizedField = new PT() { }; public static abstract class InheritedJavaTypeGoat & C> extends JavaTypeGoat { public InheritedJavaTypeGoat() { super(); } } public enum EnumTypeA { FOO, BAR(), @AnnotationWithRuntimeRetention FUZ } public enum EnumTypeB { FOO(null); private TypeA label; EnumTypeB(TypeA label) { this.label = label; } } public abstract class ExtendsJavaTypeGoat extends JavaTypeGoat { } public static abstract class Extension> {} public static class TypeA {} public static class TypeB {} @AnnotationWithRuntimeRetention @AnnotationWithSourceRetention public abstract void clazz(C n); public abstract void primitive(int n); public abstract void array(C[][] n); public abstract PT parameterized(PT n); public abstract PT> parameterizedRecursive(PT> n); public abstract PT generic(PT n); public abstract PT genericContravariant(PT n); public abstract > JavaTypeGoat genericRecursive(JavaTypeGoat n); public abstract PT genericUnbounded(PT n); public abstract void genericArray(PT[] n); public abstract void inner(C.Inner n); public abstract void enumTypeA(EnumTypeA n); public abstract void enumTypeB(EnumTypeB n); public abstract & C> InheritedJavaTypeGoat inheritedJavaTypeGoat(InheritedJavaTypeGoat n); public abstract & C> U genericIntersection(U n); public abstract T genericT(T n); // remove after signatures are common. public abstract & Intersection> void recursiveIntersection(U n); } interface C { class Inner { } } interface PT { } interface Intersection & Intersection> { T getIntersectionType(); } @Retention(RetentionPolicy.SOURCE) @interface AnnotationWithSourceRetention {} @Retention(RetentionPolicy.RUNTIME) @interface AnnotationWithRuntimeRetention {}