@@ -29,7 +29,6 @@ import org.aspectj.weaver.TypeX; | |||
import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.Argument; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.TypeReference; | |||
import org.eclipse.jdt.internal.compiler.codegen.CodeStream; | |||
@@ -47,7 +46,7 @@ import org.eclipse.jdt.core.compiler.CharOperation; | |||
* | |||
* @author Jim Hugunin | |||
*/ | |||
public class AdviceDeclaration extends MethodDeclaration { | |||
public class AdviceDeclaration extends AjMethodDeclaration { | |||
public PointcutDesignator pointcutDesignator; | |||
int baseArgumentCount; | |||
@@ -76,6 +75,7 @@ public class AdviceDeclaration extends MethodDeclaration { | |||
protected int generateInfoAttributes(ClassFile classFile) { | |||
List l = new ArrayList(1); | |||
l.add(new EclipseAttributeAdapter(makeAttribute())); | |||
addDeclarationStartLineAttribute(l,classFile); | |||
return classFile.generateMethodInfoAttribute(binding, l); | |||
} |
@@ -0,0 +1,58 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2004 IBM Corporation and others. | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Common Public License v1.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/cpl-v10.html | |||
* | |||
* Contributors: | |||
* IBM Corporation | |||
*******************************************************************************/ | |||
package org.aspectj.ajdt.internal.compiler.ast; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import org.aspectj.weaver.AjAttribute; | |||
import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration; | |||
/** | |||
* Root class for all ConstructorDeclaration objects created by the parser. | |||
* Enables us to generate extra attributes in the method_info attribute | |||
* to support aspectj. | |||
*/ | |||
public class AjConstructorDeclaration extends ConstructorDeclaration { | |||
/** | |||
* @param compilationResult | |||
*/ | |||
public AjConstructorDeclaration(CompilationResult compilationResult) { | |||
super(compilationResult); | |||
} | |||
/* (non-Javadoc) | |||
* @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) | |||
*/ | |||
protected int generateInfoAttributes(ClassFile classFile) { | |||
// add extra attributes into list then call 2-arg version of generateInfoAttributes... | |||
List extras = new ArrayList(); | |||
addDeclarationStartLineAttribute(extras,classFile); | |||
return classFile.generateMethodInfoAttribute(binding,extras); | |||
} | |||
protected void addDeclarationStartLineAttribute(List extraAttributeList, ClassFile classFile) { | |||
if (!classFile.codeStream.generateLineNumberAttributes) return; | |||
int[] separators = compilationResult().lineSeparatorPositions; | |||
int declarationStartLine = 1; | |||
for (int i = 0; i < separators.length; i++) { | |||
if (sourceStart < separators[i]) break; | |||
declarationStartLine++; | |||
} | |||
extraAttributeList.add( | |||
new EclipseAttributeAdapter(new AjAttribute.MethodDeclarationLineNumberAttribute(declarationStartLine))); | |||
} | |||
} |
@@ -0,0 +1,58 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2004 IBM Corporation and others. | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Common Public License v1.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/cpl-v10.html | |||
* | |||
* Contributors: | |||
* IBM Corporation | |||
*******************************************************************************/ | |||
package org.aspectj.ajdt.internal.compiler.ast; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import org.aspectj.weaver.AjAttribute; | |||
import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
/** | |||
* Root class for all MethodDeclaration objects created by the parser. | |||
* Enables us to generate extra attributes in the method_info attribute | |||
* to support aspectj. | |||
*/ | |||
public class AjMethodDeclaration extends MethodDeclaration { | |||
/** | |||
* @param compilationResult | |||
*/ | |||
public AjMethodDeclaration(CompilationResult compilationResult) { | |||
super(compilationResult); | |||
} | |||
/* (non-Javadoc) | |||
* @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) | |||
*/ | |||
protected int generateInfoAttributes(ClassFile classFile) { | |||
// add extra attributes into list then call 2-arg version of generateInfoAttributes... | |||
List extras = new ArrayList(); | |||
addDeclarationStartLineAttribute(extras,classFile); | |||
return classFile.generateMethodInfoAttribute(binding,extras); | |||
} | |||
protected void addDeclarationStartLineAttribute(List extraAttributeList, ClassFile classFile) { | |||
if (!classFile.codeStream.generateLineNumberAttributes) return; | |||
int[] separators = compilationResult().lineSeparatorPositions; | |||
int declarationStartLine = 1; | |||
for (int i = 0; i < separators.length; i++) { | |||
if (sourceStart < separators[i]) break; | |||
declarationStartLine++; | |||
} | |||
extraAttributeList.add( | |||
new EclipseAttributeAdapter(new AjAttribute.MethodDeclarationLineNumberAttribute(declarationStartLine))); | |||
} | |||
} |
@@ -25,7 +25,7 @@ import org.eclipse.jdt.internal.compiler.ast.*; | |||
import org.eclipse.jdt.internal.compiler.lookup.ClassScope; | |||
import org.eclipse.jdt.internal.compiler.parser.Parser; | |||
public class DeclareDeclaration extends MethodDeclaration { | |||
public class DeclareDeclaration extends AjMethodDeclaration { | |||
public Declare declareDecl; | |||
/** |
@@ -21,11 +21,10 @@ import org.aspectj.weaver.patterns.IfPointcut; | |||
import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
//import org.eclipse.jdt.internal.compiler.lookup.ClassScope; | |||
import org.eclipse.jdt.internal.compiler.parser.Parser; | |||
public class IfMethodDeclaration extends MethodDeclaration { | |||
public class IfMethodDeclaration extends AjMethodDeclaration { | |||
IfPointcut ifPointcut; | |||
public IfMethodDeclaration(CompilationResult compilationResult, IfPointcut ifPointcut) { |
@@ -24,7 +24,6 @@ import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext; | |||
import org.aspectj.weaver.*; | |||
import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.TypeReference; | |||
import org.eclipse.jdt.internal.compiler.lookup.*; | |||
import org.eclipse.jdt.core.compiler.CharOperation; | |||
@@ -34,7 +33,7 @@ import org.eclipse.jdt.core.compiler.CharOperation; | |||
* | |||
* @author Jim Hugunin | |||
*/ | |||
public abstract class InterTypeDeclaration extends MethodDeclaration { | |||
public abstract class InterTypeDeclaration extends AjMethodDeclaration { | |||
public TypeReference onType; | |||
protected ReferenceBinding onTypeBinding; | |||
@@ -134,6 +133,7 @@ public abstract class InterTypeDeclaration extends MethodDeclaration { | |||
} else { | |||
l = new ArrayList(0); | |||
} | |||
addDeclarationStartLineAttribute(l,classFile); | |||
return classFile.generateMethodInfoAttribute(binding, l); | |||
} |
@@ -26,7 +26,6 @@ import org.eclipse.jdt.internal.compiler.ClassFile; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.Argument; | |||
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.TypeReference; | |||
import org.eclipse.jdt.internal.compiler.lookup.ClassScope; | |||
@@ -41,7 +40,7 @@ import org.eclipse.jdt.core.compiler.CharOperation; | |||
* | |||
* @author Jim Hugunin | |||
*/ | |||
public class PointcutDeclaration extends MethodDeclaration { | |||
public class PointcutDeclaration extends AjMethodDeclaration { | |||
public static final char[] mangledPrefix = "ajc$pointcut$".toCharArray(); | |||
public PointcutDesignator pointcutDesignator; |
@@ -13,6 +13,8 @@ | |||
package org.aspectj.ajdt.internal.compiler.parser; | |||
import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.AjConstructorDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.AjMethodDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.IfPseudoToken; | |||
@@ -31,6 +33,7 @@ import org.aspectj.weaver.patterns.Declare; | |||
import org.eclipse.jdt.internal.compiler.CompilationResult; | |||
import org.eclipse.jdt.internal.compiler.ast.ASTNode; | |||
import org.eclipse.jdt.internal.compiler.ast.Argument; | |||
import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration; | |||
import org.eclipse.jdt.internal.compiler.ast.Expression; | |||
import org.eclipse.jdt.internal.compiler.ast.MessageSend; | |||
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; | |||
@@ -46,7 +49,21 @@ import org.eclipse.jdt.internal.compiler.parser.Parser.IDeclarationFactory; | |||
* Window>Preferences>Java>Code Generation>Code and Comments | |||
*/ | |||
public class DeclarationFactory implements IDeclarationFactory { | |||
/* (non-Javadoc) | |||
* @see org.eclipse.jdt.internal.compiler.parser.Parser.IDeclarationFactory#createMethodDeclaration(org.eclipse.jdt.internal.compiler.CompilationResult) | |||
*/ | |||
public MethodDeclaration createMethodDeclaration(CompilationResult result) { | |||
return new AjMethodDeclaration(result); | |||
} | |||
/* (non-Javadoc) | |||
* @see org.eclipse.jdt.internal.compiler.parser.Parser.IDeclarationFactory#createConstructorDeclaration(org.eclipse.jdt.internal.compiler.CompilationResult) | |||
*/ | |||
public ConstructorDeclaration createConstructorDeclaration(CompilationResult result) { | |||
return new AjConstructorDeclaration(result); | |||
} | |||
/* (non-Javadoc) | |||
* @see org.eclipse.jdt.internal.compiler.parser.Parser.IDeclarationFactory#createProceed(org.eclipse.jdt.internal.compiler.ast.MessageSend) | |||
*/ |
@@ -72,7 +72,7 @@ public class BasicCommandTestCase extends CommandTestCase { | |||
checkCompile("src1/ThisAndModifiers.java", NO_ERRORS); | |||
} | |||
public void testDeclares() { | |||
checkCompile("src1/Declares.java", new int[] {3}); | |||
checkCompile("src1/Declares.java", new int[] {2}); | |||
} | |||
public void testDeclareWarning() { |
@@ -36,7 +36,7 @@ public class PerformanceTestCase extends CommandTestCase { | |||
} | |||
public void testLazyTjp() throws IOException { | |||
checkCompile("src1/LazyTjp.aj", new String[] {"-XlazyTjp","-Xlint:error"}, new int[] {97}); | |||
checkCompile("src1/LazyTjp.aj", new String[] {"-XlazyTjp","-Xlint:error"}, new int[] {96}); | |||
TestUtil.runMain("out", "LazyTjp"); | |||
} | |||
} |
@@ -89,12 +89,15 @@ | |||
<run class="main.Main"/> | |||
</ajc-test> | |||
<!-- this test cannot work with new AjAttribute.MethodDeclarationLineNumberAttribute attribute | |||
since the attribute will be generated for the main method, and has a different reference | |||
on each serialization | |||
<ajc-test dir="expClasses" title="expected class tree" keywords="incremental-test" > | |||
<compile files="Main.java"> | |||
<dir-changes expDir="exp"/> | |||
</compile> | |||
<run class="Main"/> | |||
</ajc-test> | |||
--> | |||
</suite> |
@@ -99,7 +99,7 @@ public class HarnessSelectionTest extends TestCase { | |||
String[] options = new String[] | |||
{ "!verbose", "!eclipse", | |||
}; | |||
Exp exp = new Exp(7, 7, 0, 7, 0, 0, 0); | |||
Exp exp = new Exp(6, 6, 0, 6, 0, 0, 0); | |||
checkSelection(INCREMENTAL, options, "INFIX IGNORED", exp); | |||
} | |||
@@ -0,0 +1,52 @@ | |||
public class TestSourceLines { // L1 | |||
private int i = 0; // L3 | |||
private static int J = 1; // L5 | |||
private static int K; // L6 | |||
static { // L8 | |||
System.out.println("K = 2"); | |||
} | |||
public TestSourceLines() { // L12 | |||
i = 3; | |||
} | |||
public TestSourceLines(int i) { // L16 | |||
this.i = i; | |||
} | |||
public void foo() { // L20 | |||
System.out.println(i); | |||
} | |||
private void bar() { System.out.println(i); } // L24 | |||
protected // L26 | |||
void | |||
goo() // L28 | |||
{ | |||
System.out.println(i); | |||
} | |||
} | |||
class NoStaticInitBlock { // L35 | |||
} | |||
aspect CheckLineNumbers { // L39 | |||
declare warning : execution(* TestSourceLines.*(..)) : "method execution"; | |||
declare warning : execution(TestSourceLines.new(..)) : "cons execution"; | |||
declare warning : staticinitialization(*) : "static init"; | |||
declare warning : initialization(*.new(..)) : "init"; | |||
declare warning : preinitialization(*.new(..)) : "pre-init"; | |||
before() : execution(* TestSourceLines.*(..)) { // L47 | |||
System.out.println("boo"); | |||
} | |||
declare warning : adviceexecution() : "advice"; | |||
} |
@@ -1,7 +1,7 @@ | |||
import org.aspectj.testing.*; | |||
public class DeclareWarningMain { | |||
public static void main (String[] args) { // DW 5 main | |||
public static void main (String[] args) { // DW 4 main | |||
Tester.checkAllEvents(); | |||
} | |||
static { | |||
@@ -10,7 +10,7 @@ public class DeclareWarningMain { | |||
} | |||
aspect Warnings { | |||
declare warning : execution(static void main(String[])) : "main"; // for DW 5 main | |||
declare warning : execution(static void main(String[])) : "main"; // for DW 4 main | |||
// just to show that pointcut is valid - works if warning removed | |||
before() : execution(static void main(String[])) { |
@@ -69,8 +69,8 @@ aspect A { | |||
declare warning: adviceexecution() && within(A) | |||
: "adviceExecution() && within(A)"; | |||
before() : initialization(DeclareWarning.new(..)) { | |||
// CW 74 | |||
before() : initialization(DeclareWarning.new(..)) { // CW 72 | |||
long l = System.currentTimeMillis(); | |||
if (0l == l) { | |||
throw new Error("never thrown"); |
@@ -1860,7 +1860,7 @@ | |||
<ajc-test dir="new" title="simple declare warning (NPE)" | |||
keywords="from-resolved_105"> | |||
<compile files="DeclareWarningMain.java"> | |||
<message kind="warning" line="5"/> | |||
<message kind="warning" line="4"/> | |||
</compile> | |||
<run class="DeclareWarningMain"/> | |||
</ajc-test> |
@@ -237,7 +237,7 @@ | |||
<ajc-test dir="new" pr="838" | |||
title="checking around join point for advice return type - numeric"> | |||
<compile files="AroundNumericCastCE.java"> | |||
<message kind="error" line="12"/> | |||
<message kind="error" line="11"/> | |||
<message kind="error" line="17"/> | |||
</compile> | |||
</ajc-test> | |||
@@ -406,7 +406,7 @@ | |||
<message kind="warning" line="33" text="handler(OutOfMemoryError) && within(DeclareWarning)"/> | |||
<message kind="warning" line="36" text="handler(Error)"/> | |||
<message kind="warning" line="39" text="handler(RuntimeException) && withincode(DeclareWarning.new())"/> | |||
<message kind="warning" line="74" text="adviceExecution() && within(A)"/> | |||
<message kind="warning" line="72" text="adviceExecution() && within(A)"/> | |||
</compile> | |||
</ajc-test> | |||
@@ -132,7 +132,7 @@ public class IncrementalTests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
public void test012() throws Exception { | |||
runTest("incremental with aspect-driven full rebuild"); | |||
nextIncrement(false); | |||
MessageSpec messageSpec = new MessageSpec(newMessageList(new Message(4,"Main.java",null,null)),null); | |||
MessageSpec messageSpec = new MessageSpec(newMessageList(new Message(3,"Main.java",null,null)),null); | |||
copyFileAndDoIncrementalBuild("changes/Aspect.20.java","src/Aspect.java",messageSpec); | |||
run("Main"); | |||
} |
@@ -189,7 +189,7 @@ | |||
</compile> | |||
<!-- | |||
<inc-compile tag="20"> | |||
<message kind="warning" line="4" file="Main.java"/> | |||
<message kind="warning" line="3" file="Main.java"/> | |||
</inc-compile> | |||
<run class="Main"/> | |||
--> |
@@ -176,7 +176,7 @@ | |||
<message kind="error" line="3" file="Aspect.java"/> | |||
</compile> | |||
<inc-compile tag="20"> | |||
<message kind="warning" line="4" file="Main.java"/> | |||
<message kind="warning" line="3" file="Main.java"/> | |||
</inc-compile> | |||
<run class="Main"/> | |||
</ajc-test> |
@@ -128,7 +128,8 @@ | |||
title="decent errors for around return type not matching target point" | |||
keywords="from-errors"> | |||
<compile files="AroundReturnType.java"> | |||
<message kind="error" line="3"/> | |||
<message kind="error" line="2"/> | |||
<message kind="error" line="6"/> | |||
<message kind="error" line="7"/> | |||
<message kind="error" line="16"/> | |||
<message kind="error" line="21"/> |
@@ -87,6 +87,8 @@ public abstract class AjAttribute { | |||
DataInputStream s = new DataInputStream(new ByteArrayInputStream(bytes)); | |||
if (name.equals(Aspect.AttributeName)) { | |||
return new Aspect(PerClause.readPerClause(s, context)); | |||
} else if (name.equals(MethodDeclarationLineNumberAttribute.AttributeName)) { | |||
return MethodDeclarationLineNumberAttribute.read(s); | |||
} else if (name.equals(WeaverState.AttributeName)) { | |||
return new WeaverState(WeaverStateInfo.read(s, context)); | |||
} else if (name.equals(AdviceAttribute.AttributeName)) { | |||
@@ -206,6 +208,32 @@ public abstract class AjAttribute { | |||
} | |||
} | |||
public static class MethodDeclarationLineNumberAttribute extends AjAttribute { | |||
public static final String AttributeName = "org.aspectj.weaver.MethodDeclarationLineNumber"; | |||
public String getNameString() { | |||
return AttributeName; | |||
} | |||
private int lineNumber; | |||
public MethodDeclarationLineNumberAttribute(int line) { | |||
this.lineNumber = line; | |||
} | |||
public int getLineNumber() { return lineNumber; } | |||
public void write(DataOutputStream s) throws IOException { | |||
s.writeInt(lineNumber); | |||
} | |||
public static MethodDeclarationLineNumberAttribute read(DataInputStream s) throws IOException { | |||
return new MethodDeclarationLineNumberAttribute(s.readInt()); | |||
} | |||
} | |||
public static class PointcutDeclarationAttribute extends AjAttribute { | |||
public static final String AttributeName = "org.aspectj.weaver.PointcutDeclaration"; | |||
@@ -34,6 +34,7 @@ final class BcelMethod extends ResolvedMember { | |||
private boolean isAjSynthetic; | |||
private ShadowMunger associatedShadowMunger; | |||
private AjAttribute.EffectiveSignatureAttribute effectiveSignature; | |||
private AjAttribute.MethodDeclarationLineNumberAttribute declarationLineNumber; | |||
BcelMethod(BcelObjectType declaringType, Method method) { | |||
super( | |||
@@ -84,7 +85,9 @@ final class BcelMethod extends ResolvedMember { | |||
//System.out.println("unpack: " + this + ", " + as); | |||
for (Iterator iter = as.iterator(); iter.hasNext();) { | |||
AjAttribute a = (AjAttribute) iter.next(); | |||
if (a instanceof AjAttribute.AdviceAttribute) { | |||
if (a instanceof AjAttribute.MethodDeclarationLineNumberAttribute) { | |||
declarationLineNumber = (AjAttribute.MethodDeclarationLineNumberAttribute)a; | |||
} else if (a instanceof AjAttribute.AdviceAttribute) { | |||
associatedShadowMunger = ((AjAttribute.AdviceAttribute)a).reify(this, world); | |||
return; | |||
} else if (a instanceof AjAttribute.AjSynthetic) { | |||
@@ -113,6 +116,18 @@ final class BcelMethod extends ResolvedMember { | |||
return effectiveSignature; | |||
} | |||
public boolean hasDeclarationLineNumberInfo() { | |||
return declarationLineNumber != null; | |||
} | |||
public int getDeclarationLineNumber() { | |||
if (declarationLineNumber != null) { | |||
return declarationLineNumber.getLineNumber(); | |||
} else { | |||
return -1; | |||
} | |||
} | |||
public Kind getKind() { | |||
if (associatedShadowMunger != null) { | |||
return ADVICE; |
@@ -303,6 +303,21 @@ public class BcelShadow extends Shadow { | |||
} | |||
public int getSourceLine() { | |||
// if the kind of join point for which we are a shadow represents | |||
// a method or constructor execution, then the best source line is | |||
// the one from the enclosingMethod declarationLineNumber if available. | |||
Kind kind = getKind(); | |||
if ( (kind == MethodExecution) || | |||
(kind == ConstructorExecution) || | |||
(kind == AdviceExecution) || | |||
(kind == StaticInitialization) || | |||
(kind == PreInitialization) || | |||
(kind == Initialization)) { | |||
if (getEnclosingMethod().hasDeclaredLineNumberInfo()) { | |||
return getEnclosingMethod().getDeclarationLineNumber(); | |||
} | |||
} | |||
if (range == null) { | |||
if (getEnclosingMethod().hasBody()) { | |||
return Utility.getSourceLine(getEnclosingMethod().getBody().getStart()); |
@@ -161,6 +161,18 @@ public final class LazyMethodGen { | |||
this.name = m.getName(); | |||
} | |||
public boolean hasDeclaredLineNumberInfo() { | |||
return (memberView != null && memberView.hasDeclarationLineNumberInfo()); | |||
} | |||
public int getDeclarationLineNumber() { | |||
if (hasDeclaredLineNumberInfo()) { | |||
return memberView.getDeclarationLineNumber(); | |||
} else { | |||
return -1; | |||
} | |||
} | |||
private void initialize() { | |||
if (returnType != null) return; | |||