Lines 2831-2842
Link Here
|
2831 |
// nothing to do by default |
2831 |
// nothing to do by default |
2832 |
if (this.compilationUnit.isPackageInfo()) { |
2832 |
if (this.compilationUnit.isPackageInfo()) { |
2833 |
this.compilationUnit.types = new TypeDeclaration[1]; |
2833 |
this.compilationUnit.types = new TypeDeclaration[1]; |
2834 |
// create a fake interface declaration |
2834 |
this.compilationUnit.createPackageInfoType(); |
2835 |
TypeDeclaration declaration = new TypeDeclaration(this.compilationUnit.compilationResult); |
|
|
2836 |
declaration.name = TypeConstants.PACKAGE_INFO_NAME; |
2837 |
declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface; |
2838 |
this.compilationUnit.types[0] = declaration; |
2839 |
declaration.javadoc = this.compilationUnit.javadoc; |
2840 |
} |
2835 |
} |
2841 |
} |
2836 |
} |
2842 |
protected void consumeEmptyMemberValueArrayInitializer() { |
2837 |
protected void consumeEmptyMemberValueArrayInitializer() { |
Lines 4040-4051
Link Here
|
4040 |
// InternalCompilationUnit ::= ImportDeclarations ReduceImports |
4035 |
// InternalCompilationUnit ::= ImportDeclarations ReduceImports |
4041 |
if (this.compilationUnit.isPackageInfo()) { |
4036 |
if (this.compilationUnit.isPackageInfo()) { |
4042 |
this.compilationUnit.types = new TypeDeclaration[1]; |
4037 |
this.compilationUnit.types = new TypeDeclaration[1]; |
4043 |
// create a fake interface declaration |
4038 |
this.compilationUnit.createPackageInfoType(); |
4044 |
TypeDeclaration declaration = new TypeDeclaration(this.compilationUnit.compilationResult); |
|
|
4045 |
declaration.name = TypeConstants.PACKAGE_INFO_NAME; |
4046 |
declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface; |
4047 |
this.compilationUnit.types[0] = declaration; |
4048 |
declaration.javadoc = this.compilationUnit.javadoc; |
4049 |
} |
4039 |
} |
4050 |
} |
4040 |
} |
4051 |
protected void consumeInternalCompilationUnitWithTypes() { |
4041 |
protected void consumeInternalCompilationUnitWithTypes() { |
Lines 4060-4071
Link Here
|
4060 |
this.compilationUnit.types = new TypeDeclaration[length + 1]; |
4050 |
this.compilationUnit.types = new TypeDeclaration[length + 1]; |
4061 |
this.astPtr -= length; |
4051 |
this.astPtr -= length; |
4062 |
System.arraycopy(this.astStack, this.astPtr + 1, this.compilationUnit.types, 1, length); |
4052 |
System.arraycopy(this.astStack, this.astPtr + 1, this.compilationUnit.types, 1, length); |
4063 |
// create a fake interface declaration |
4053 |
this.compilationUnit.createPackageInfoType(); |
4064 |
TypeDeclaration declaration = new TypeDeclaration(this.compilationUnit.compilationResult); |
|
|
4065 |
declaration.name = TypeConstants.PACKAGE_INFO_NAME; |
4066 |
declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface; |
4067 |
this.compilationUnit.types[0] = declaration; |
4068 |
declaration.javadoc = this.compilationUnit.javadoc; |
4069 |
} else { |
4054 |
} else { |
4070 |
this.compilationUnit.types = new TypeDeclaration[length]; |
4055 |
this.compilationUnit.types = new TypeDeclaration[length]; |
4071 |
this.astPtr -= length; |
4056 |
this.astPtr -= length; |