langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/JavadocMemberEnter.java
author jjg
Fri, 27 May 2016 13:06:58 -0700
changeset 38617 d93a7f64e231
parent 37938 42baa89d2156
child 42827 36468b5fa7f4
permissions -rw-r--r--
8157606: deprecate com.sun.javadoc API Reviewed-by: ksrini
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) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        context.put(memberEnterKey, new Context.Factory<MemberEnter>() {
8614
06e42328ddab 7021650: fix Context issues
jjg
parents: 5520
diff changeset
    61
               public MemberEnter make(Context c) {
06e42328ddab 7021650: fix Context issues
jjg
parents: 5520
diff changeset
    62
                   return new JavadocMemberEnter(c);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
               }
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        });
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    final DocEnv docenv;
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
    protected JavadocMemberEnter(Context context) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
        super(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
        docenv = DocEnv.instance(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
13077
16fb753bb5dc 7174143: encapsulate doc comment table
jjg
parents: 10189
diff changeset
    74
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
    public void visitMethodDef(JCMethodDecl tree) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
        super.visitMethodDef(tree);
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    77
        MethodSymbol meth = tree.sym;
27224
228abfa87080 8054457: Refactor Symbol kinds from small ints to an enum
emc
parents: 25874
diff changeset
    78
        if (meth == null || meth.kind != MTH) return;
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 14802
diff changeset
    79
        TreePath treePath = docenv.getTreePath(env.toplevel, env.enclClass, tree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        if (meth.isConstructor())
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    81
            docenv.makeConstructorDoc(meth, treePath);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        else if (isAnnotationTypeElement(meth))
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    83
            docenv.makeAnnotationTypeElementDoc(meth, treePath);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        else
14802
969e90f68ac5 8004828: refactor init of *DocImpl classes
jjg
parents: 14441
diff changeset
    85
            docenv.makeMethodDoc(meth, treePath);
14441
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    86
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    87
        // release resources
6c066a762e05 8002146: javadoc doesn't release resources in a timely manner
jjg
parents: 14260
diff changeset
    88
        tree.body = null;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
13077
16fb753bb5dc 7174143: encapsulate doc comment table
jjg
parents: 10189
diff changeset
    91
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
    public void visitVarDef(JCVariableDecl tree) {
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    93
        if (tree.init != null) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    94
            boolean isFinal = (tree.mods.flags & FINAL) != 0
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    95
                    || (env.enclClass.mods.flags & INTERFACE) != 0;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    96
            if (!isFinal || containsNonConstantExpression(tree.init)) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    97
                // Avoid unnecessary analysis and release resources.
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    98
                // In particular, remove non-constant expressions
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
    99
                // which may trigger Attr.attribClass, since
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   100
                // method bodies are also removed, in visitMethodDef.
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   101
                tree.init = null;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   102
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   103
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        super.visitVarDef(tree);
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        if (tree.sym != null &&
27224
228abfa87080 8054457: Refactor Symbol kinds from small ints to an enum
emc
parents: 25874
diff changeset
   106
                tree.sym.kind == VAR &&
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
                !isParameter(tree.sym)) {
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 14802
diff changeset
   108
            docenv.makeFieldDoc(tree.sym, docenv.getTreePath(env.toplevel, env.enclClass, tree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        }
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 isAnnotationTypeElement(MethodSymbol meth) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
        return ClassDocImpl.isAnnotationType(meth.enclClass());
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
    private static boolean isParameter(VarSymbol var) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        return (var.flags() & Flags.PARAMETER) != 0;
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
    }
19666
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   119
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
     * 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
   122
     * for any non-constant expression. This does not include checking references
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   123
     * to other fields which may or may not be constant.
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
    private static boolean containsNonConstantExpression(JCExpression tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   126
        return new MaybeConstantExpressionScanner().containsNonConstantExpression(tree);
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
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   129
    /**
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   130
     * See JLS 15.18, Constant Expression
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   131
     */
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   132
    private static class MaybeConstantExpressionScanner extends JCTree.Visitor {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   133
        boolean maybeConstantExpr = true;
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
        public boolean containsNonConstantExpression(JCExpression tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   136
            scan(tree);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   137
            return !maybeConstantExpr;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   138
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   139
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   140
        public void scan(JCTree tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   141
            // short circuit scan when end result is definitely false
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   142
            if (maybeConstantExpr && tree != null)
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   143
                tree.accept(this);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   144
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   145
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   146
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   147
        /** default for any non-overridden visit method. */
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   148
        public void visitTree(JCTree tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   149
            maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   150
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   151
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   152
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   153
        public void visitBinary(JCBinary tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   154
            switch (tree.getTag()) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   155
                case MUL: case DIV: case MOD:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   156
                case PLUS: case MINUS:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   157
                case SL: case SR: case USR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   158
                case LT: case LE: case GT: case GE:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   159
                case EQ: case NE:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   160
                case BITAND: case BITXOR: case BITOR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   161
                case AND: case OR:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   162
                    break;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   163
                default:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   164
                    maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   165
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   166
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   167
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   168
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   169
        public void visitConditional(JCConditional tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   170
            scan(tree.cond);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   171
            scan(tree.truepart);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   172
            scan(tree.falsepart);
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
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   175
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   176
        public void visitIdent(JCIdent tree) { }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   177
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   178
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   179
        public void visitLiteral(JCLiteral tree) { }
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
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   182
        public void visitParens(JCParens tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   183
            scan(tree.expr);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   184
        }
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
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   187
        public void visitSelect(JCTree.JCFieldAccess tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   188
            scan(tree.selected);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   189
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   190
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   191
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   192
        public void visitTypeCast(JCTypeCast tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   193
            scan(tree.clazz);
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   194
            scan(tree.expr);
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
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   197
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   198
        public void visitTypeIdent(JCPrimitiveTypeTree tree) { }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   199
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   200
        @Override
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   201
        public void visitUnary(JCUnary tree) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   202
            switch (tree.getTag()) {
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   203
                case POS: case NEG: case COMPL: case NOT:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   204
                    break;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   205
                default:
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   206
                    maybeConstantExpr = false;
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   207
            }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   208
        }
01a225608c25 8010310: [javadoc] Error processing sources with -private
jjg
parents: 15354
diff changeset
   209
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
}