< prev index next >

test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/TestReflectionAPI.java

Print this page




  33  *          InvalidNestHost.java
  34  *
  35  * @compile MemberNoHost.jcod
  36  *          MemberMissingHost.jcod
  37  *          MemberNotInstanceHost.jcod
  38  *          MemberNotOurHost.jcod
  39  *          MemberMalformedHost.jcod
  40  *          MalformedHost.jcod
  41  *          PackagedNestHost.jcod
  42  *          PackagedNestHost2Member.jcod
  43  *          PackagedNestHostMember.jcod
  44  *          HostOfMemberNoHost.jcod
  45  *          HostOfMemberMissingHost.jcod
  46  *          HostOfMemberNotInstanceHost.jcod
  47  *          HostOfMemberNotOurHost.jcod
  48  *          HostOfMemberMalformedHost.jcod
  49  *          HostWithSelfMember.jcod
  50  *          HostWithDuplicateMembers.jcod
  51  *
  52  * @run main/othervm TestReflectionAPI

  53  */
  54 
  55 // We need a nest member class that is invalid for each of the possible reasons,
  56 // plus we need some external classes to test other failure modes.
  57 // For each nested class below there is a corresponding .jcod file which breaks one
  58 // of the rules regarding nest membership. For the package related tests we have
  59 // additional PackageNestHost*.java sources.
  60 // For testing getNestMembers we need an external host class that has a nested class
  61 // which we can form a jcod file from such that we get all the expected failure modes.
  62 // Note that all the .java files must be compiled in the same step, while all
  63 // .jcod files must be compiled in a later step.
  64 
  65 import java.util.Arrays;
  66 import java.util.Comparator;
  67 import java.util.HashSet;
  68 
  69 public class TestReflectionAPI {
  70 
  71     // Valid nest member
  72     static class Member {}




  33  *          InvalidNestHost.java
  34  *
  35  * @compile MemberNoHost.jcod
  36  *          MemberMissingHost.jcod
  37  *          MemberNotInstanceHost.jcod
  38  *          MemberNotOurHost.jcod
  39  *          MemberMalformedHost.jcod
  40  *          MalformedHost.jcod
  41  *          PackagedNestHost.jcod
  42  *          PackagedNestHost2Member.jcod
  43  *          PackagedNestHostMember.jcod
  44  *          HostOfMemberNoHost.jcod
  45  *          HostOfMemberMissingHost.jcod
  46  *          HostOfMemberNotInstanceHost.jcod
  47  *          HostOfMemberNotOurHost.jcod
  48  *          HostOfMemberMalformedHost.jcod
  49  *          HostWithSelfMember.jcod
  50  *          HostWithDuplicateMembers.jcod
  51  *
  52  * @run main/othervm TestReflectionAPI
  53  * @run main/othervm/java.security.policy=empty.policy TestReflectionAPI
  54  */
  55 
  56 // We need a nest member class that is invalid for each of the possible reasons,
  57 // plus we need some external classes to test other failure modes.
  58 // For each nested class below there is a corresponding .jcod file which breaks one
  59 // of the rules regarding nest membership. For the package related tests we have
  60 // additional PackageNestHost*.java sources.
  61 // For testing getNestMembers we need an external host class that has a nested class
  62 // which we can form a jcod file from such that we get all the expected failure modes.
  63 // Note that all the .java files must be compiled in the same step, while all
  64 // .jcod files must be compiled in a later step.
  65 
  66 import java.util.Arrays;
  67 import java.util.Comparator;
  68 import java.util.HashSet;
  69 
  70 public class TestReflectionAPI {
  71 
  72     // Valid nest member
  73     static class Member {}


< prev index next >