langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/JavadocMemberEnter.java
author mcimadamore
Fri, 16 Dec 2016 15:27:34 +0000
changeset 42827 36468b5fa7f4
parent 38617 d93a7f64e231
permissions -rw-r--r--
8181370: Convert anonymous inner classes into lambdas/method references Reviewed-by: jjg, rfield, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 14802
diff changeset
     2
 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
37938
42baa89d2156 8075703: jdk.javadoc module exports com.sun.tools.javadoc package which contains a lot of internal API.
jjg
parents: 27224
diff changeset
    26
package com.sun.tools.javadoc.main;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    28
import com.sun.source.util.TreePath;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.javac.code.Flags;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import com.sun.tools.javac.code.Symbol.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import com.sun.tools.javac.comp.MemberEnter;
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    32
import com.sun.tools.javac.tree.JCTree;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
import com.sun.tools.javac.tree.JCTree.*;
13077
16fb753bb5dc 7174143: encapsulate doc comment table
jjg
parents: 10189
diff changeset
    34
import com.sun.tools.javac.util.Context;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    36
import static com.sun.tools.javac.code.Flags.*;
27224
228abfa87080 8054457: Refactor Symbol kinds from small ints to an enum
emc
parents: 25874
diff changeset
    37
import static com.sun.tools.javac.code.Kinds.Kind.*;
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    38
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 *  Javadoc's own memberEnter phase does a few things above and beyond that
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 *  done by javac.
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    42
 *
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    43
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    44
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    45
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    46
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 13077
diff changeset
    47
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 *  @author Neal Gafter
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
 */
38617
d93a7f64e231 8157606: deprecate com.sun.javadoc API
jjg
parents: 37938
diff changeset
    50
@Deprecated
10189
57268b86d4da 7059905: (javadoc) promote method visibility for netbeans usage
ksrini
parents: 8614
diff changeset
    51
public class JavadocMemberEnter extends MemberEnter {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    public static JavadocMemberEnter instance0(Context context) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
        MemberEnter instance = context.get(memberEnterKey);
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
        if (instance == null)
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
            instance = new JavadocMemberEnter(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
        return (JavadocMemberEnter)instance;
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
8614
06e42328ddab 7021650: fix Context issues
jjg
parents: 5520
diff changeset
    59
    public static void preRegister(Context context) {
42827
36468b5fa7f4 8181370: Convert anonymous inner classes into lambdas/method references
mcimadamore
parents: 38617
diff changeset
    60
        context.put(memberEnterKey, (Context.Factory<MemberEnter>)JavadocMemberEnter::new);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    final DocEnv docenv;
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    protected JavadocMemberEnter(Context context) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        super(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
        docenv = DocEnv.instance(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
13077
16fb753bb5dc 7174143: encapsulate doc comment table
jjg
parents: 10189
diff changeset
    70
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
    public void visitMethodDef(JCMethodDecl tree) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
        super.visitMethodDef(tree);
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    73
        MethodSymbol meth = tree.sym;
27224
228abfa87080 8054457: Refactor Symbol kinds from small ints to an enum
emc
parents: 25874
diff changeset
    74
        if (meth == null || meth.kind != MTH) return;
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 14802
diff changeset
    75
        TreePath treePath = docenv.getTreePath(env.toplevel, env.enclClass, tree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
        if (meth.isConstructor())
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    77
            docenv.makeConstructorDoc(meth, treePath);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
        else if (isAnnotationTypeElement(meth))
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    79
            docenv.makeAnnotationTypeElementDoc(meth, treePath);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        else
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    81
            docenv.makeMethodDoc(meth, treePath);
14441
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    82
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    83
        // release resources
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    84
        tree.body = null;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
13077
16fb753bb5dc 7174143: encapsulate doc comment table
jjg
parents: 10189
diff changeset
    87
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    public void visitVarDef(JCVariableDecl tree) {
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    89
        if (tree.init != null) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    90
            boolean isFinal = (tree.mods.flags & FINAL) != 0
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    91
                    || (env.enclClass.mods.flags & INTERFACE) != 0;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    92
            if (!isFinal || containsNonConstantExpression(tree.init)) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    93
                // Avoid unnecessary analysis and release resources.
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    94
                // In particular, remove non-constant expressions
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    95
                // which may trigger Attr.attribClass, since
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    96
                // method bodies are also removed, in visitMethodDef.
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    97
                tree.init = null;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    98
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    99
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        super.visitVarDef(tree);
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        if (tree.sym != null &&
27224
228abfa87080 8054457: Refactor Symbol kinds from small ints to an enum
emc
parents: 25874
diff changeset
   102
                tree.sym.kind == VAR &&
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
                !isParameter(tree.sym)) {
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 14802
diff changeset
   104
            docenv.makeFieldDoc(tree.sym, docenv.getTreePath(env.toplevel, env.enclClass, tree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    private static boolean isAnnotationTypeElement(MethodSymbol meth) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        return ClassDocImpl.isAnnotationType(meth.enclClass());
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
    private static boolean isParameter(VarSymbol var) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
        return (var.flags() & Flags.PARAMETER) != 0;
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    }
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   115
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   116
    /**
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   117
     * Simple analysis of an expression tree to see if it contains tree nodes
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   118
     * for any non-constant expression. This does not include checking references
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   119
     * to other fields which may or may not be constant.
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   120
     */
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   121
    private static boolean containsNonConstantExpression(JCExpression tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   122
        return new MaybeConstantExpressionScanner().containsNonConstantExpression(tree);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   123
    }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   124
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   125
    /**
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   126
     * See JLS 15.18, Constant Expression
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   127
     */
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   128
    private static class MaybeConstantExpressionScanner extends JCTree.Visitor {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   129
        boolean maybeConstantExpr = true;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   130
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   131
        public boolean containsNonConstantExpression(JCExpression tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   132
            scan(tree);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   133
            return !maybeConstantExpr;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   134
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   135
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   136
        public void scan(JCTree tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   137
            // short circuit scan when end result is definitely false
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   138
            if (maybeConstantExpr && tree != null)
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   139
                tree.accept(this);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   140
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   141
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   142
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   143
        /** default for any non-overridden visit method. */
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   144
        public void visitTree(JCTree tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   145
            maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   146
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   147
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   148
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   149
        public void visitBinary(JCBinary tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   150
            switch (tree.getTag()) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   151
                case MUL: case DIV: case MOD:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   152
                case PLUS: case MINUS:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   153
                case SL: case SR: case USR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   154
                case LT: case LE: case GT: case GE:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   155
                case EQ: case NE:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   156
                case BITAND: case BITXOR: case BITOR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   157
                case AND: case OR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   158
                    break;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   159
                default:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   160
                    maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   161
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   162
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   163
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   164
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   165
        public void visitConditional(JCConditional tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   166
            scan(tree.cond);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   167
            scan(tree.truepart);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   168
            scan(tree.falsepart);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   169
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   170
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   171
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   172
        public void visitIdent(JCIdent tree) { }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   173
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   174
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   175
        public void visitLiteral(JCLiteral tree) { }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   176
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   177
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   178
        public void visitParens(JCParens tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   179
            scan(tree.expr);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   180
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   181
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   182
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   183
        public void visitSelect(JCTree.JCFieldAccess tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   184
            scan(tree.selected);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   185
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   186
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   187
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   188
        public void visitTypeCast(JCTypeCast tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   189
            scan(tree.clazz);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   190
            scan(tree.expr);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   191
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   192
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   193
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   194
        public void visitTypeIdent(JCPrimitiveTypeTree tree) { }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   195
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   196
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   197
        public void visitUnary(JCUnary tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   198
            switch (tree.getTag()) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   199
                case POS: case NEG: case COMPL: case NOT:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   200
                    break;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   201
                default:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   202
                    maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   203
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   204
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   205
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
}