Path: blob/master/test/hotspot/jtreg/compiler/jvmci/common/testcases/TestCase.java
41161 views
/*1* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package compiler.jvmci.common.testcases;2425import java.lang.reflect.Executable;26import java.util.Arrays;27import java.util.Collection;28import java.util.HashSet;29import java.util.Set;3031/**32* A test case for tests in compiler.jvmci.compilerToVM package.33*/34public class TestCase {35private static final Class<?>[] CLASSES = {36AbstractClass.class,37AbstractClassExtender.class,38AnotherSingleImplementer.class,39AnotherSingleImplementerInterface.class,40DoNotExtendClass.class,41DoNotImplementInterface.class,42MultipleAbstractImplementer.class,43MultipleImplementer1.class,44MultipleImplementer2.class,45MultipleImplementersInterface.class,46MultipleImplementersInterfaceExtender.class,47MultiSubclassedClass.class,48MultiSubclassedClassSubclass1.class,49MultiSubclassedClassSubclass2.class,50PackagePrivateClass.class,51SimpleClass.class,52SingleImplementer.class,53SingleImplementerInterface.class,54SingleSubclass.class,55SingleSubclassedClass.class56};5758public static Collection<Class<?>> getAllClasses() {59return Arrays.asList(CLASSES);60}6162public static Collection<Executable> getAllExecutables() {63Set<Executable> result = new HashSet<>();64for (Class<?> aClass : CLASSES) {65result.addAll(Arrays.asList(aClass.getMethods()));66result.addAll(Arrays.asList(aClass.getConstructors()));67}68return result;69}70}717273