langtools/test/tools/javac/processing/model/trees/OnDemandAttributionData.java
author jlahoda
Fri, 23 Sep 2016 15:35:32 +0200
changeset 41160 61082a97bbf0
permissions -rw-r--r--
8047347: com.sun.source.util.Trees breaks the compiler. Summary: Clearing synthetic constructors and super constructor calls between annotation processing rounds. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41160
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     1
/*
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     2
 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     4
 *
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     7
 * published by the Free Software Foundation.
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     8
 *
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    13
 * accompanied this code).
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    14
 *
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    18
 *
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    21
 * questions.
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    22
 */
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    23
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    24
public class OnDemandAttributionData {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    25
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    26
    public OnDemandAttributionData(int i) {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    27
        class Local { }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    28
        new Aux(Gen.C) { };
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    29
    }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    30
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    31
    class Aux {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    32
        Aux(String str) {}
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    33
        Aux(int i) {}
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    34
        Aux(long l) {}
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    35
    }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    36
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    37
    private void methodAttributionTest() {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    38
        System.err.println("");
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    39
    }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    40
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    41
    enum E {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    42
        A;
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    43
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    44
        final int i;
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    45
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    46
        E() {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    47
            i = Integer.parseInt("1");
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    48
        }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    49
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    50
    }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    51
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    52
    enum E2 {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    53
        A;
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    54
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    55
        {
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    56
            int i = Integer.parseInt("1");
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    57
        }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    58
    }
61082a97bbf0 8047347: com.sun.source.util.Trees breaks the compiler.
jlahoda
parents:
diff changeset
    59
}