test/tools/javac/T5003235/T5003235b.java

Tue, 03 Jun 2008 13:26:47 -0700

author
jjg
date
Tue, 03 Jun 2008 13:26:47 -0700
changeset 46
7708bd6d800d
parent 1
9a66ca7c79fa
child 611
4172cfff05f0
permissions
-rw-r--r--

4075303: Use javap to enquire aboput a specific inner class
4348375: Javap is not internationalized
4459541: "javap -l" shows line numbers as signed short; they should be unsigned
4501660: change diagnostic of -help as 'print this help message and exit'
4776241: unused source file in javap...
4870651: javap should recognize generics, varargs, enum
4876942: javap invoked without args does not print help screen
4880663: javap could output whitespace between class name and opening brace
4975569: javap doesn't print new flag bits
6271787: javap dumps LocalVariableTypeTable attribute in hex, needs to print a table
6305779: javap: support annotations
6439940: Clean up javap implementation
6469569: wrong check of searchpath in JavapEnvironment
6474890: javap does not open .zip files in -classpath
6587786: Javap throws error : "ERROR:Could not find <classname>" for JRE classes
6622215: javap ignores certain relevant access flags
6622216: javap names some attributes incorrectly
6622232: javap gets whitespace confused
6622260: javap prints negative bytes incorrectly in hex
Reviewed-by: ksrini

     1 /*
     2  * @test  /nodynamiccopyright/
     3  * @bug     5003235
     4  * @summary Accessibility of private inner class
     5  * @author  Peter von der Ah\u00e9
     6  * @compile/fail/ref=T5003235b.out -XDstdout -XDdiags=%b:%l:%_%m T5003235b.java
     7  */
     9 class Outer {
    10     public Inner inner;
    12     public void create() {
    13         inner = new Inner();
    14     }
    16     private class Inner {
    17         int k = 100;
    18         protected int l = 100;
    19         public int m = 100;
    20         protected int n = 100;
    21     }
    22 }
    24 class Access {
    25     public static void main(String[] args) {
    26         Outer outer = new Outer();
    27         outer.create();
    28         System.out.println("Value of k: " + outer.inner.k);
    29         System.out.println("Value of l: " + outer.inner.l);
    30         System.out.println("Value of m: " + outer.inner.m);
    31         System.out.println("Value of n: " + outer.inner.n);
    32     }
    33 }

mercurial