mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 14:09:25 +00:00
Use default visibility for test classes and methods in spring-core
See gh-23451
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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 example.type;
|
||||
|
||||
/**
|
||||
* We must use a standalone set of types to ensure that no one else is loading
|
||||
* them and interfering with
|
||||
* {@link org.springframework.core.type.ClassloadingAssertions#assertClassNotLoaded(String)}.
|
||||
*
|
||||
* @author Ramnivas Laddad
|
||||
* @author Juergen Hoeller
|
||||
* @author Oliver Gierke
|
||||
* @author Sam Brannen
|
||||
* @see org.springframework.core.type.AnnotationTypeFilterTests
|
||||
*/
|
||||
public class AnnotationTypeFilterTestsTypes {
|
||||
|
||||
@InheritedAnnotation
|
||||
public static class SomeComponent {
|
||||
}
|
||||
|
||||
|
||||
@InheritedAnnotation
|
||||
public interface SomeComponentInterface {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static class SomeClassWithSomeComponentInterface implements Cloneable, SomeComponentInterface {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static class SomeSubclassOfSomeComponent extends SomeComponent {
|
||||
}
|
||||
|
||||
@NonInheritedAnnotation
|
||||
public static class SomeClassMarkedWithNonInheritedAnnotation {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static class SomeSubclassOfSomeClassMarkedWithNonInheritedAnnotation extends SomeClassMarkedWithNonInheritedAnnotation {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static class SomeNonCandidateClass {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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 example.type;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* We must use a standalone set of types to ensure that no one else is loading
|
||||
* them and interfering with
|
||||
* {@link org.springframework.core.type.ClassloadingAssertions#assertClassNotLoaded(String)}.
|
||||
*
|
||||
* @author Ramnivas Laddad
|
||||
* @author Sam Brannen
|
||||
* @see org.springframework.core.type.AspectJTypeFilterTests
|
||||
*/
|
||||
public class AspectJTypeFilterTestsTypes {
|
||||
|
||||
public interface SomeInterface {
|
||||
}
|
||||
|
||||
public static class SomeClass {
|
||||
}
|
||||
|
||||
public static class SomeClassExtendingSomeClass extends SomeClass {
|
||||
}
|
||||
|
||||
public static class SomeClassImplementingSomeInterface implements SomeInterface {
|
||||
}
|
||||
|
||||
public static class SomeClassExtendingSomeClassExtendingSomeClassAndImplementingSomeInterface
|
||||
extends SomeClassExtendingSomeClass implements SomeInterface {
|
||||
}
|
||||
|
||||
@Component
|
||||
public static class SomeClassAnnotatedWithComponent {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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 example.type;
|
||||
|
||||
/**
|
||||
* We must use a standalone set of types to ensure that no one else is loading
|
||||
* them and interfering with
|
||||
* {@link org.springframework.core.type.ClassloadingAssertions#assertClassNotLoaded(String)}.
|
||||
*
|
||||
* @author Ramnivas Laddad
|
||||
* @author Juergen Hoeller
|
||||
* @author Sam Brannen
|
||||
* @see org.springframework.core.type.AssignableTypeFilterTests
|
||||
*/
|
||||
public class AssignableTypeFilterTestsTypes {
|
||||
|
||||
public static class TestNonInheritingClass {
|
||||
}
|
||||
|
||||
public interface TestInterface {
|
||||
}
|
||||
|
||||
public static class TestInterfaceImpl implements TestInterface {
|
||||
}
|
||||
|
||||
public interface SomeDaoLikeInterface {
|
||||
}
|
||||
|
||||
public static class SomeDaoLikeImpl extends SimpleJdbcDaoSupport implements SomeDaoLikeInterface {
|
||||
}
|
||||
|
||||
public interface JdbcDaoSupport {
|
||||
}
|
||||
|
||||
public static class SimpleJdbcDaoSupport implements JdbcDaoSupport {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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 example.type;
|
||||
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface InheritedAnnotation {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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 example.type;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface NonInheritedAnnotation {
|
||||
}
|
||||
Reference in New Issue
Block a user