equal
deleted
inserted
replaced
59 |
59 |
60 /** A switch to determine whether we check for package/class conflicts |
60 /** A switch to determine whether we check for package/class conflicts |
61 */ |
61 */ |
62 final static boolean checkClash = true; |
62 final static boolean checkClash = true; |
63 |
63 |
64 private final Name.Table names; |
64 private final Names names; |
65 private final Enter enter; |
65 private final Enter enter; |
66 private final Log log; |
66 private final Log log; |
67 private final Check chk; |
67 private final Check chk; |
68 private final Attr attr; |
68 private final Attr attr; |
69 private final Symtab syms; |
69 private final Symtab syms; |
84 return instance; |
84 return instance; |
85 } |
85 } |
86 |
86 |
87 protected MemberEnter(Context context) { |
87 protected MemberEnter(Context context) { |
88 context.put(memberEnterKey, this); |
88 context.put(memberEnterKey, this); |
89 names = Name.Table.instance(context); |
89 names = Names.instance(context); |
90 enter = Enter.instance(context); |
90 enter = Enter.instance(context); |
91 log = Log.instance(context); |
91 log = Log.instance(context); |
92 chk = Check.instance(context); |
92 chk = Check.instance(context); |
93 attr = Attr.instance(context); |
93 attr = Attr.instance(context); |
94 syms = Symtab.instance(context); |
94 syms = Symtab.instance(context); |
917 List<Type> argtypes = List.nil(); |
917 List<Type> argtypes = List.nil(); |
918 List<Type> typarams = List.nil(); |
918 List<Type> typarams = List.nil(); |
919 List<Type> thrown = List.nil(); |
919 List<Type> thrown = List.nil(); |
920 long ctorFlags = 0; |
920 long ctorFlags = 0; |
921 boolean based = false; |
921 boolean based = false; |
922 if (c.name.len == 0) { |
922 if (c.name.isEmpty()) { |
923 JCNewClass nc = (JCNewClass)env.next.tree; |
923 JCNewClass nc = (JCNewClass)env.next.tree; |
924 if (nc.constructor != null) { |
924 if (nc.constructor != null) { |
925 Type superConstrType = types.memberType(c.type, |
925 Type superConstrType = types.memberType(c.type, |
926 nc.constructor); |
926 nc.constructor); |
927 argtypes = superConstrType.getParameterTypes(); |
927 argtypes = superConstrType.getParameterTypes(); |
1066 target.compilerBootstrap(c))) { |
1066 target.compilerBootstrap(c))) { |
1067 // constructors of true enums are private |
1067 // constructors of true enums are private |
1068 flags = (flags & ~AccessFlags) | PRIVATE | GENERATEDCONSTR; |
1068 flags = (flags & ~AccessFlags) | PRIVATE | GENERATEDCONSTR; |
1069 } else |
1069 } else |
1070 flags |= (c.flags() & AccessFlags) | GENERATEDCONSTR; |
1070 flags |= (c.flags() & AccessFlags) | GENERATEDCONSTR; |
1071 if (c.name.len == 0) flags |= ANONCONSTR; |
1071 if (c.name.isEmpty()) flags |= ANONCONSTR; |
1072 JCTree result = make.MethodDef( |
1072 JCTree result = make.MethodDef( |
1073 make.Modifiers(flags), |
1073 make.Modifiers(flags), |
1074 names.init, |
1074 names.init, |
1075 null, |
1075 null, |
1076 make.TypeParams(typarams), |
1076 make.TypeParams(typarams), |