} | } | ||||
} | } | ||||
/** | |||||
* History is recorded for {@link LinkNode} navigations. | |||||
*/ | |||||
public void fireNavigationAction(IProgramElement pe, boolean isLink) { | public void fireNavigationAction(IProgramElement pe, boolean isLink) { | ||||
navigationAction(pe, isLink); | navigationAction(pe, isLink); | ||||
} | } |
* Return count of messages seen through this interface. | * Return count of messages seen through this interface. | ||||
* | * | ||||
* @param kind the IMessage.Kind of the messages to count (if null, count all) | * @param kind the IMessage.Kind of the messages to count (if null, count all) | ||||
* @param orGreater if true, then count this kind and any considered greater by the ordering of IMessage.Kind.COMPARATOR | |||||
* @param orGreater if true, then count this kind and any considered greater by the ordering of IMessage.Kind#COMPARATOR | |||||
* @return number of messages of this kind (optionally or greater) | * @return number of messages of this kind (optionally or greater) | ||||
* @see IMessage.Kind.COMPARATOR | |||||
* @see IMessage.Kind#COMPARATOR | |||||
*/ | */ | ||||
public int numMessages(IMessage.Kind kind, boolean orGreater) { | public int numMessages(IMessage.Kind kind, boolean orGreater) { | ||||
if (null != proxy) { | if (null != proxy) { |
// public static final Kind ANY = new Kind("any-selector", 0); | // public static final Kind ANY = new Kind("any-selector", 0); | ||||
/** | /** | ||||
* list of Kind in precedence order. 0 is less than IMessage.Kind.COMPARATOR.compareTo(KINDS.get(i), KINDS.get(i + 1)) | |||||
* list of Kind in precedence order. 0 is less than IMessage.Kind#COMPARATOR.compareTo(KINDS.get(i), KINDS.get(i + 1)) | |||||
*/ | */ | ||||
List<Kind> KINDS = Collections.unmodifiableList(Arrays.asList(new Kind[] { WEAVEINFO, INFO, DEBUG, TASKTAG, | List<Kind> KINDS = Collections.unmodifiableList(Arrays.asList(new Kind[] { WEAVEINFO, INFO, DEBUG, TASKTAG, | ||||
WARNING, ERROR, FAIL, ABORT })); | WARNING, ERROR, FAIL, ABORT })); |
* why? | * why? | ||||
* | * | ||||
* @see org.aspectj.lang.reflect.SourceLocation | * @see org.aspectj.lang.reflect.SourceLocation | ||||
* @see org.aspectj.compiler.base.parser.SourceInfo | |||||
* @see org.aspectj.tools.ide.SourceLine | |||||
* @see org.aspectj.testing.harness.ErrorLine | |||||
*/ | */ | ||||
public interface ISourceLocation extends java.io.Serializable { | public interface ISourceLocation extends java.io.Serializable { | ||||
int MAX_LINE = Integer.MAX_VALUE / 2; | int MAX_LINE = Integer.MAX_VALUE / 2; |
* | * | ||||
* @param messageHolder | * @param messageHolder | ||||
* @param out | * @param out | ||||
* @see #print(PrintStream, String, IMessageHolder, IMessageRenderer, IMessageHandler) | |||||
* @see #print(PrintStream, IMessageHolder, String, IMessageRenderer, IMessageHandler) | |||||
*/ | */ | ||||
public static void print(PrintStream out, IMessageHolder messageHolder) { | public static void print(PrintStream out, IMessageHolder messageHolder) { | ||||
print(out, messageHolder, (String) null, (IMessageRenderer) null, (IMessageHandler) null); | print(out, messageHolder, (String) null, (IMessageRenderer) null, (IMessageHandler) null); | ||||
* | * | ||||
* @param holder | * @param holder | ||||
* @param out | * @param out | ||||
* @see #print(PrintStream, String, IMessageHolder, IMessageRenderer, IMessageHandler) | |||||
* @see #print(PrintStream, IMessageHolder, String, IMessageRenderer, IMessageHandler) | |||||
*/ | */ | ||||
public static void print(PrintStream out, IMessageHolder holder, String prefix) { | public static void print(PrintStream out, IMessageHolder holder, String prefix) { | ||||
print(out, holder, prefix, (IMessageRenderer) null, (IMessageHandler) null); | print(out, holder, prefix, (IMessageRenderer) null, (IMessageHandler) null); | ||||
* @param holder | * @param holder | ||||
* @param out | * @param out | ||||
* @param renderer IMessageRender to render result - use MESSAGE_LINE if null | * @param renderer IMessageRender to render result - use MESSAGE_LINE if null | ||||
* @see #print(PrintStream, String, IMessageHolder, IMessageRenderer, IMessageHandler) | |||||
* @see #print(PrintStream, IMessageHolder, String, IMessageRenderer, IMessageHandler) | |||||
*/ | */ | ||||
public static void print(PrintStream out, IMessageHolder holder, String prefix, IMessageRenderer renderer) { | public static void print(PrintStream out, IMessageHolder holder, String prefix, IMessageRenderer renderer) { | ||||
print(out, holder, prefix, renderer, (IMessageHandler) null); | print(out, holder, prefix, renderer, (IMessageHandler) null); | ||||
* | * | ||||
* @param messages if null, return EMPTY_LIST | * @param messages if null, return EMPTY_LIST | ||||
* @param kind if null, return messages | * @param kind if null, return messages | ||||
* @see MessageHandler#getMessages(Kind) | |||||
* @see MessageHandler#getMessages(Kind, boolean) | |||||
*/ | */ | ||||
public static List<IMessage> getMessages(List<IMessage> messages, IMessage.Kind kind) { | public static List<IMessage> getMessages(List<IMessage> messages, IMessage.Kind kind) { | ||||
if (null == messages) { | if (null == messages) { |
* endLine. | * endLine. | ||||
* | * | ||||
* @see org.aspectj.lang.reflect.SourceLocation | * @see org.aspectj.lang.reflect.SourceLocation | ||||
* @see org.aspectj.compiler.base.parser.SourceInfo | |||||
* @see org.aspectj.tools.ide.SourceLine | |||||
* @see org.aspectj.testing.harness.ErrorLine | |||||
*/ | */ | ||||
public class SourceLocation implements ISourceLocation { | public class SourceLocation implements ISourceLocation { | ||||
* | * | ||||
* @param flush if true, empty errors | * @param flush if true, empty errors | ||||
* @return null if none, String otherwise | * @return null if none, String otherwise | ||||
* @see BuildArgParser() | |||||
* @see #BuildArgParser(IMessageHandler) | |||||
*/ | */ | ||||
public String getOtherMessages(boolean flush) { | public String getOtherMessages(boolean flush) { | ||||
if (null == errorSink) { | if (null == errorSink) { |
*/ | */ | ||||
public class PointcutBinding extends Binding { | public class PointcutBinding extends Binding { | ||||
/** | |||||
/* (non-Javadoc) | |||||
* @see org.eclipse.jdt.internal.compiler.lookup.BindingPattern#bindingType() | * @see org.eclipse.jdt.internal.compiler.lookup.BindingPattern#bindingType() | ||||
*/ | */ | ||||
public int bindingType() { | public int bindingType() { | ||||
return 0; | return 0; | ||||
} | } | ||||
/** | |||||
/* (non-Javadoc) | |||||
* @see org.eclipse.jdt.internal.compiler.lookup.BindingPattern#readableName() | * @see org.eclipse.jdt.internal.compiler.lookup.BindingPattern#readableName() | ||||
*/ | */ | ||||
public char[] readableName() { | public char[] readableName() { |
/** | /** | ||||
* Creates a new AST matcher instance. | * Creates a new AST matcher instance. | ||||
* <p> | * <p> | ||||
* For backwards compatibility, the matcher ignores tag elements below doc comments by default. Use {@link #ASTMatcher(boolean) | |||||
* ASTMatcher(true)} for a matcher that compares doc tags by default. | |||||
* For backwards compatibility, the matcher ignores tag elements below doc comments by default. Use {@link #AjASTMatcher(boolean) | |||||
* AjASTMatcher(true)} for a matcher that compares doc tags by default. | |||||
* </p> | * </p> | ||||
*/ | */ | ||||
public AjASTMatcher() { | public AjASTMatcher() { |
* | * | ||||
* @param pass true result of the command | * @param pass true result of the command | ||||
* @param holder IMessageHolder with messages from the command | * @param holder IMessageHolder with messages from the command | ||||
* @see reportCommandResults(IMessageHolder) | |||||
* @return false if the process should abort | * @return false if the process should abort | ||||
*/ | */ | ||||
protected boolean report(boolean pass, IMessageHolder holder) { | protected boolean report(boolean pass, IMessageHolder holder) { |
/** | /** | ||||
* Register a munger for perclause {@literal @}AJ aspect so that we add aspectOf(..) to them as needed | * Register a munger for perclause {@literal @}AJ aspect so that we add aspectOf(..) to them as needed | ||||
* | * | ||||
* @see org.aspectj.weaver.bcel.BcelWorld#makePerClauseAspect(ResolvedType, org.aspectj.weaver.patterns.PerClause.Kind) | |||||
* @see org.aspectj.weaver.bcel.BcelWeavingSupport#makePerClauseAspect(ResolvedType, org.aspectj.weaver.patterns.PerClause.Kind) | |||||
*/ | */ | ||||
ConcreteTypeMunger makePerClauseAspect(ResolvedType aspect, PerClause.Kind kind); | ConcreteTypeMunger makePerClauseAspect(ResolvedType aspect, PerClause.Kind kind); | ||||
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesExactly(ResolvedType type) { | protected boolean matchesExactly(ResolvedType type) { | ||||
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
public FuzzyBoolean matchesInstanceof(ResolvedType type) { | public FuzzyBoolean matchesInstanceof(ResolvedType type) { | ||||
// return FuzzyBoolean.YES; | // return FuzzyBoolean.YES; | ||||
// } | // } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesSubtypes(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesSubtypes(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesSubtypes(ResolvedType type) { | protected boolean matchesSubtypes(ResolvedType type) { |
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesExactly(ResolvedType type) { | protected boolean matchesExactly(ResolvedType type) { | ||||
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
public FuzzyBoolean matchesInstanceof(ResolvedType type) { | public FuzzyBoolean matchesInstanceof(ResolvedType type) { |
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesExactly(ResolvedType type) { | protected boolean matchesExactly(ResolvedType type) { | ||||
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
public FuzzyBoolean matchesInstanceof(ResolvedType type) { | public FuzzyBoolean matchesInstanceof(ResolvedType type) { | ||||
// return FuzzyBoolean.YES; | // return FuzzyBoolean.YES; | ||||
// } | // } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesSubtypes(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesSubtypes(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesSubtypes(ResolvedType type) { | protected boolean matchesSubtypes(ResolvedType type) { |
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.TypePattern#matchesExactly(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesExactly(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
protected boolean matchesExactly(ResolvedType type) { | protected boolean matchesExactly(ResolvedType type) { | ||||
} | } | ||||
/** | /** | ||||
* @see org.aspectj.weaver.TypePattern#matchesInstanceof(IType) | |||||
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(ResolvedType) | |||||
*/ | */ | ||||
@Override | @Override | ||||
public FuzzyBoolean matchesInstanceof(ResolvedType type) { | public FuzzyBoolean matchesInstanceof(ResolvedType type) { |
* This task was developed by the <a href="http://aspectj.org">AspectJ Project</a> | * This task was developed by the <a href="http://aspectj.org">AspectJ Project</a> | ||||
* | * | ||||
* @author <a href="mailto:palm@parc.xerox.com">Jeffrey Palm</a> | * @author <a href="mailto:palm@parc.xerox.com">Jeffrey Palm</a> | ||||
* @see org.aspectj.tools.ant.taskdefs.compilers.AjcCompiler | |||||
* @see org.aspectj.tools.ant.taskdefs.compilers.Ajc | |||||
*/ | */ | ||||
public class Ajc2 extends Javac { | public class Ajc2 extends Javac { | ||||
* to <code>true</code>. | * to <code>true</code>. | ||||
* | * | ||||
* @return new PatternSet.NameEntry to be added to the include list. | * @return new PatternSet.NameEntry to be added to the include list. | ||||
* @see org.apache.tools.taskdefs.Javac#createInclude() | |||||
* @see org.apache.tools.ant.taskdefs.Javac#createInclude() | |||||
*/ | */ | ||||
public PatternSet.NameEntry createInclude() { | public PatternSet.NameEntry createInclude() { | ||||
haveIncludes = true; | haveIncludes = true; | ||||
* to <code>true</code>. | * to <code>true</code>. | ||||
* | * | ||||
* @return new PatternSet.NameEntry to be added to the exclude list. | * @return new PatternSet.NameEntry to be added to the exclude list. | ||||
* @see org.apache.tools.taskdefs.Javac#createExclude() | |||||
* @see org.apache.tools.ant.taskdefs.Javac#createExclude() | |||||
*/ | */ | ||||
public PatternSet.NameEntry createExclude() { | public PatternSet.NameEntry createExclude() { | ||||
haveExcludes = true; | haveExcludes = true; | ||||
* to <code>true</code>. | * to <code>true</code>. | ||||
* | * | ||||
* @param includes Comma-separated list of includes. | * @param includes Comma-separated list of includes. | ||||
* @see org.apache.tools.taskdefs.Javac#setIncludes(java.lang.String) | |||||
* @see org.apache.tools.ant.taskdefs.Javac#setIncludes(java.lang.String) | |||||
*/ | */ | ||||
public void setIncludes(String includes) { | public void setIncludes(String includes) { | ||||
haveIncludes = true; | haveIncludes = true; | ||||
* to <code>true</code>. | * to <code>true</code>. | ||||
* | * | ||||
* @param excludes Comma-separated list of excludes. | * @param excludes Comma-separated list of excludes. | ||||
* @see org.apache.tools.taskdefs.Javac#setExcludes(java.lang.String) | |||||
* @see org.apache.tools.ant.taskdefs.Javac#setExcludes(java.lang.String) | |||||
*/ | */ | ||||
public void setExcludes(String excludes) { | public void setExcludes(String excludes) { | ||||
haveExcludes = true; | haveExcludes = true; |
* | * | ||||
* @param args String[] of the complete compiler command to execute | * @param args String[] of the complete compiler command to execute | ||||
* | * | ||||
* @see DefaultCompilerAdapter#executeExternalCompile(String[], int) | |||||
* @throws BuildException if ajc aborts (negative value) or if failonerror and there were compile errors. | * @throws BuildException if ajc aborts (negative value) or if failonerror and there were compile errors. | ||||
*/ | */ | ||||
protected void executeInOtherVM(String[] args) { | protected void executeInOtherVM(String[] args) { |
* This task was developed by the <a href="http://aspectj.org">AspectJ Project</a> | * This task was developed by the <a href="http://aspectj.org">AspectJ Project</a> | ||||
* | * | ||||
* @author <a href="mailto:palm@parc.xerox.com">Jeffrey Palm</a> | * @author <a href="mailto:palm@parc.xerox.com">Jeffrey Palm</a> | ||||
* @see org.aspectj.tools.ant.taskdefs.Ajc | |||||
* @see org.aspectj.tools.ant.taskdefs.Ajc2 | |||||
*/ | */ | ||||
public class Ajc extends DefaultCompilerAdapter { | public class Ajc extends DefaultCompilerAdapter { | ||||
* Renders exception <code>t</code> after unwrapping and eliding any test packages. | * Renders exception <code>t</code> after unwrapping and eliding any test packages. | ||||
* | * | ||||
* @param t <code>Throwable</code> to print. | * @param t <code>Throwable</code> to print. | ||||
* @see #maxStackTrace | |||||
* @see StringChecker#TEST_PACKAGES | |||||
*/ | */ | ||||
public static String renderException(Throwable t) { | public static String renderException(Throwable t) { | ||||
return renderException(t, true); | return renderException(t, true); |
* The class maintains an in-memory cache, and uses a queue of {@link AsyncCommand}s | * The class maintains an in-memory cache, and uses a queue of {@link AsyncCommand}s | ||||
* to signal to a background thread various actions required to "synchronize" | * to signal to a background thread various actions required to "synchronize" | ||||
* the in-memory cache with the persisted copy. Whenever there is a cache miss | * the in-memory cache with the persisted copy. Whenever there is a cache miss | ||||
* from the {@link #get(CachedClassReference)} call, the weaver issues a | |||||
* {@link #put(CachedClassEntry)} call. This call has 2 side-effects: | |||||
* from the {@link #get(CachedClassReference, byte[])} call, the weaver issues a | |||||
* {@link #put(CachedClassEntry, byte[])} call. This call has 2 side-effects: | |||||
* <UL> | * <UL> | ||||
* <LI> | * <LI> | ||||
* The in-memory cache is updated so that subsequent calls to {@link #get(CachedClassReference)} | |||||
* The in-memory cache is updated so that subsequent calls to {@link #get(CachedClassReference, byte[])} | |||||
* will not return the mapped value. | * will not return the mapped value. | ||||
* </LI> | * </LI> | ||||
* | * |