@@ -55,7 +55,7 @@ public interface IOutputLocationManager { | |||
List<File> getAllOutputLocations(); | |||
/** | |||
* Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be | |||
* Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be | |||
* placed. | |||
*/ | |||
File getDefaultOutputLocation(); | |||
@@ -70,7 +70,7 @@ public interface IOutputLocationManager { | |||
void reportFileWrite(String outputfile, int fileType); | |||
/** | |||
* @return a Map<File,String> from inpath absolute paths to handle components | |||
* @return a Map<File,String> from inpath absolute paths to handle components | |||
*/ | |||
Map<File, String> getInpathMap(); | |||
@@ -18,7 +18,7 @@ package org.aspectj.ajde.ui; | |||
* @author Mik Kersten | |||
* | |||
* To change this generated comment edit the template variable "typecomment": | |||
* Window>Preferences>Java>Templates. | |||
* Window>Preferences>Java>Templates. | |||
*/ | |||
public class InvalidResourceException extends Exception { | |||
@@ -794,7 +794,7 @@ public class Main implements Config { | |||
} | |||
/** | |||
* Sets the output working dir to be <fullyQualifiedOutputDir>\ajdocworkingdir Useful in testing to redirect the ajdocworkingdir | |||
* Sets the output working dir to be <fullyQualifiedOutputDir>\ajdocworkingdir. Useful in testing to redirect the ajdocworkingdir | |||
* to the sandbox | |||
*/ | |||
public static void setOutputWorkingDir(String fullyQulifiedOutputDir) { | |||
@@ -806,7 +806,7 @@ public class Main implements Config { | |||
} | |||
/** | |||
* Resets the output working dir to be the default which is <the current directory>\ajdocworkingdir | |||
* Resets the output working dir to be the default which is <the current directory>\ajdocworkingdir | |||
*/ | |||
public static void resetOutputWorkingDir() { | |||
outputWorkingDir = Config.WORKING_DIR; |
@@ -21,7 +21,7 @@ public interface IModelFilter { | |||
/** | |||
* Called when about to dump out an absolute file location, enabling it to be altered (eg. | |||
* c:/temp/ajcsSandbox/foo/ajctemp.12323/<BLAH> could become TEST_SANDBOX/<BLAH> | |||
* c:/temp/ajcsSandbox/foo/ajctemp.12323/<BLAH> could become TEST_SANDBOX/<BLAH> | |||
*/ | |||
String processFilelocation(String loc); | |||
@@ -21,9 +21,9 @@ import org.aspectj.bridge.ISourceLocation; | |||
/** | |||
* Creates JDT-like handles, for example | |||
* | |||
* method with string argument: <tjp{Demo.java[Demo~main~\[QString; method with generic argument: | |||
* <pkg{MyClass.java[MyClass~myMethod~QList\<QString;>; an aspect: <pkg*A1.aj}A1 advice with Integer arg: | |||
* <pkg*A8.aj}A8&afterReturning&QInteger; method call: <pkg*A10.aj[C~m1?method-call(void pkg.C.m2()) | |||
* method with string argument: <tjp{Demo.java[Demo~main~\[QString; method with generic argument: | |||
* <pkg{MyClass.java[MyClass~myMethod~QList\<QString;>; an aspect: <pkg*A1.aj}A1 advice with Integer arg: | |||
* <pkg*A8.aj}A8&afterReturning&QInteger; method call: <pkg*A10.aj[C~m1?method-call(void pkg.C.m2()) | |||
* | |||
*/ | |||
public class JDTLikeHandleProvider implements IElementHandleProvider { |
@@ -44,7 +44,7 @@ public class NameConvertor { | |||
/** | |||
* Creates a readable name from the given char array, for example, given 'I' returns 'int'. Moreover, given | |||
* 'Ljava/lang/String;<Ljava/lang/String;>' returns 'java.lang.String<java.lang.String>' | |||
* 'Ljava/lang/String;<Ljava/lang/String;>' returns 'java.lang.String<java.lang.String>' | |||
*/ | |||
public static char[] convertFromSignature(char[] c) { | |||
int lt = CharOperation.indexOf('<', c); | |||
@@ -138,7 +138,7 @@ public class NameConvertor { | |||
// } | |||
/** | |||
* Given 'Ppkg/MyGenericClass<Ljava/lang/String;Ljava/lang/Integer;>;' will return 'QMyGenericClass<QString;QInteger;>;' | |||
* Given 'Ppkg/MyGenericClass<Ljava/lang/String;Ljava/lang/Integer;>;' will return 'QMyGenericClass<QString;QInteger;>;' | |||
*/ | |||
public static char[] createShortName(char[] c, boolean haveFullyQualifiedAtLeastOneThing, boolean needsFullyQualifiedFirstEntry) { | |||
if (c[0] == '[') { |
@@ -497,7 +497,7 @@ public class ProgramElement implements IProgramElement { | |||
} | |||
/** | |||
* Trim down fully qualified types to their short form (e.g. a.b.c.D<e.f.G> becomes D<G>) | |||
* Trim down fully qualified types to their short form (e.g., a.b.c.D<e.f.G> becomes D<G>) | |||
*/ | |||
public static String trim(String fqname) { | |||
int i = fqname.indexOf("<"); | |||
@@ -655,7 +655,7 @@ public class ProgramElement implements IProgramElement { | |||
} | |||
/** | |||
* TODO: move the "parent != null"==>injar heuristic to more explicit | |||
* TODO: move the "parent != null"→injar heuristic to more explicit | |||
*/ | |||
public String toLinkLabelString() { | |||
return toLinkLabelString(true); |
@@ -18,7 +18,7 @@ import java.io.File; | |||
import org.aspectj.util.LangUtil; | |||
/** | |||
* Immutable source location. This guarantees that the source file is not null and that the numeric values are positive and line <= | |||
* Immutable source location. This guarantees that the source file is not null and that the numeric values are positive and line ≤ | |||
* endLine. | |||
* | |||
* @see org.aspectj.lang.reflect.SourceLocation | |||
@@ -77,7 +77,7 @@ public class SourceLocation implements ISourceLocation { | |||
/** | |||
* @param file File of the source; if null, use ISourceLocation.NO_FILE, not null | |||
* @param line int starting line of the location - positive number | |||
* @param endLine int ending line of the location - <= starting line | |||
* @param endLine int ending line of the location - ≤ starting line | |||
* @param column int character position of starting location - positive number | |||
*/ | |||
public SourceLocation(File file, int line, int endLine, int column) { |
@@ -43,7 +43,7 @@ public class Aj implements ClassPreProcessor { | |||
/** | |||
* References are added to this queue when their associated classloader is removed, and once on here that indicates that we | |||
* should tidy up the adaptor map and remove the adaptor (weaver) from the map we are maintaining from adaptorkey > adaptor | |||
* should tidy up the adaptor map and remove the adaptor (weaver) from the map we are maintaining from adaptorkey > adaptor | |||
* (weaver) | |||
*/ | |||
private static ReferenceQueue adaptorQueue = new ReferenceQueue(); | |||
@@ -369,4 +369,4 @@ public class Aj implements ClassPreProcessor { | |||
((ClassLoaderWeavingAdaptor) WeaverContainer.getWeaver(loader, weavingContext)).flushGeneratedClassesFor(className); | |||
} | |||
} | |||
} |
@@ -64,28 +64,28 @@ import org.aspectj.weaver.bcel.UnwovenClassFile; | |||
* Here is the compiler loop difference when pipelining. | |||
* | |||
* the old way: Finished diet parsing [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java] Finished diet parsing | |||
* [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] > AjLookupEnvironment.completeTypeBindings() < | |||
* [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] > AjLookupEnvironment.completeTypeBindings() < | |||
* AjLookupEnvironment.completeTypeBindings() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) compiling | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) compiling | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() | |||
* >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() | |||
* >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) woven class ClassTwo (from | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <AjCompilerAdapter.weave() | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <AjCompilerAdapter.weave() | |||
* | |||
* the new way (see the compiling/weaving mixed up): Finished diet parsing | |||
* [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java] Finished diet parsing | |||
* [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] >AjLookupEnvironment.completeTypeBindings() | |||
* <AjLookupEnvironment.completeTypeBindings() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) >AjCompilerAdapter.weave() | |||
* >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) <AjCompilerAdapter.weave() compiling | |||
* [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] >AjLookupEnvironment.completeTypeBindings() | |||
* <AjLookupEnvironment.completeTypeBindings() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) >AjCompilerAdapter.weave() | |||
* >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) <AjCompilerAdapter.weave() compiling | |||
* C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() woven class ClassTwo | |||
* >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) | |||
* <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() woven class ClassTwo | |||
* (from C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <AjCompilerAdapter.weave() | |||
* | |||
* | |||
@@ -680,4 +680,4 @@ public class AjPipeliningCompilerAdapter extends AbstractCompilerAdapter { | |||
return resultsPendingWeave; | |||
} | |||
} | |||
} |
@@ -57,7 +57,7 @@ public interface CompilationResultDestinationManager { | |||
List /* File */getAllOutputLocations(); | |||
/** | |||
* Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be | |||
* Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be | |||
* placed. | |||
*/ | |||
File getDefaultOutputLocation(); |
@@ -46,7 +46,7 @@ import org.aspectj.weaver.patterns.Pointcut; | |||
* generates the following: public static final boolean ajc$if_N(formals*, | |||
* [thisJoinPoints as needed]) { return expr; } | |||
* | |||
* Here's the complicated bit, it deals with cflow: (a): ... this(a) && cflow(if | |||
* Here's the complicated bit, it deals with cflow: (a): ... this(a) && cflow(if | |||
* (a == foo)) is an error. The way we capture this is: We generate the ajc$if | |||
* method with an (a) parameter, we let eclipse do the proper name binding. We | |||
* then, as a post pass (that we need to do anyway) look for the used |
@@ -347,7 +347,7 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration { | |||
/** | |||
* Create the list of aliases based on what was supplied as parameters for the ontype. | |||
* For example, if the declaration is 'List<N> SomeType<N>.foo' then the alias list | |||
* For example, if the declaration is 'List<N> SomeType<N>.foo' then the alias list | |||
* will simply contain 'N' and 'N' will mean 'the first type variable declared for | |||
* type SomeType' | |||
*/ |
@@ -46,7 +46,7 @@ import org.aspectj.weaver.bcel.BcelObjectType; | |||
/** | |||
* In the pipeline world, we can be weaving before all types have come through from compilation. In some cases this means the weaver | |||
* will want to ask questions of eclipse types and this subtype of ResolvedMemberImpl is here to answer some of those questions - it | |||
* is backed by the real eclipse MethodBinding object and can translate from Eclipse -> Weaver information. | |||
* is backed by the real eclipse MethodBinding object and can translate from Eclipse → Weaver information. | |||
*/ | |||
public class EclipseResolvedMember extends ResolvedMemberImpl { | |||
@@ -28,7 +28,7 @@ import org.aspectj.weaver.CompressingDataOutputStream; | |||
* Central point for all things incremental... - keeps track of the state recorded for each different config file - allows limited | |||
* interaction with these states | |||
* | |||
* - records dependency/change info for particular classpaths > this will become what JDT keeps in its 'State' object when its | |||
* - records dependency/change info for particular classpaths > this will become what JDT keeps in its 'State' object when its | |||
* finished | |||
*/ | |||
public class IncrementalStateManager { | |||
@@ -144,4 +144,4 @@ public class IncrementalStateManager { | |||
// FIXME asc needs a persistence mechanism for storing/loading all state info | |||
// FIXME asc needs to understand two config files might point at the same output dir... what to do about this? | |||
} | |||
} |
@@ -3584,7 +3584,7 @@ public class AjASTConverter extends ASTConverter { | |||
/** | |||
* This method is used to retrieve the ending position for a type declaration when the dimension is right after the type name. | |||
* For example: int[] i; => return 5, but int i[] => return -1; | |||
* For example: int[] i; → return 5, but int i[] → return -1; | |||
* | |||
* @return int the dimension found | |||
*/ |
@@ -218,7 +218,7 @@ public class Main { | |||
* | |||
* @param args the String[] command line for the compiler | |||
* @param useSystemExit if true, use System.exit(int) to complete unless one of the args is -noExit. and signal result (0 no | |||
* exceptions/error, <0 exceptions, >0 compiler errors). | |||
* exceptions/error, <0 exceptions, >0 compiler errors). | |||
*/ | |||
public void runMain(String[] args, boolean useSystemExit) { | |||
// Urk - default no check for AJDT, enabled here for Ant, command-line |
@@ -238,7 +238,7 @@ public class AjcMemberMaker { | |||
} | |||
/** | |||
* Return a resolvedmember representing the synthetic getter for the field. The old style (<1.6.9) is a heavyweight static | |||
* Return a resolvedmember representing the synthetic getter for the field. The old style (<1.6.9) is a heavyweight static | |||
* method with a long name. The new style (1.6.9 and later) is short, and reusable across aspects. | |||
* | |||
* @param aspectType the aspect attempting the access | |||
@@ -272,7 +272,7 @@ public class AjcMemberMaker { | |||
} | |||
/** | |||
* Return a resolvedmember representing the synthetic setter for the field. The old style (<1.6.9) is a heavyweight static | |||
* Return a resolvedmember representing the synthetic setter for the field. The old style (<1.6.9) is a heavyweight static | |||
* method with a long name. The new style (1.6.9 and later) is short, not always static, and reusable across aspects. | |||
* | |||
* @param aspectType the aspect attempting the access | |||
@@ -566,8 +566,8 @@ public class AjcMemberMaker { | |||
} | |||
/** | |||
* Sometimes the intertyped method requires a bridge method alongside it. For example if the method 'N SomeI<N>.m()' is put onto | |||
* an interface 'interface I<N extends Number>' and then a concrete implementation is 'class C implements I<Float>' then the ITD | |||
* Sometimes the intertyped method requires a bridge method alongside it. For example if the method 'N SomeI<N>.m()' is put onto | |||
* an interface 'interface I<N extends Number>' and then a concrete implementation is 'class C implements I<Float>' then the ITD | |||
* on the interface will be 'Number m()', whereas the ITD on the 'topmostimplementor' will be 'Float m()'. A bridge method needs | |||
* to be created in the topmostimplementor 'Number m()' that delegates to 'Float m()' | |||
*/ |
@@ -107,16 +107,16 @@ public abstract class ConcreteTypeMunger implements PartialOrder.PartialComparab | |||
} | |||
/** | |||
* returns true if the ITD target type used type variables, for example I<T>. When they are specified like this, the ITDs | |||
* returns true if the ITD target type used type variables, for example I<T>. When they are specified like this, the ITDs | |||
* 'share' type variables with the generic type. Usually this method is called because we need to know whether to tailor the | |||
* munger for addition to a particular type. For example: <code> | |||
* interface I<T> {} | |||
* interface I<T> {} | |||
* | |||
* aspect X implements I<String> { | |||
* List<T> I<T>.foo { return null; } | |||
* aspect X implements I<String> { | |||
* List<T> I<T>.foo { return null; } | |||
* } | |||
* </code> In this case the munger matches X but it matches with the form <code> | |||
* List<String> foo() { return null; } | |||
* List<String> foo() { return null; } | |||
* </code> | |||
*/ | |||
public boolean isTargetTypeParameterized() { |
@@ -98,7 +98,7 @@ public class MemberImpl implements Member { | |||
// ---- utility methods | |||
/** | |||
* Build a signature based on the return type and parameter types. For example: "(Ljava/util/Set<Ljava/lang/String;>;)V" or | |||
* Build a signature based on the return type and parameter types. For example: "(Ljava/util/Set<Ljava/lang/String;>;)V" or | |||
* "(Ljava/util/Set;)V". The latter form shows what happens when the generics are erased | |||
*/ | |||
public static String typesToSignature(UnresolvedType returnType, UnresolvedType[] paramTypes, boolean eraseGenerics) { | |||
@@ -121,7 +121,7 @@ public class MemberImpl implements Member { | |||
} | |||
/** | |||
* Returns "(<signaturesOfParamTypes>,...)" - unlike the other typesToSignature that also includes the return type, this one | |||
* Returns "(<signaturesOfParamTypes>,...)" - unlike the other typesToSignature that also includes the return type, this one | |||
* just deals with the parameter types. | |||
*/ | |||
public static String typesToSignature(UnresolvedType[] paramTypes) { |
@@ -114,8 +114,8 @@ public class NameMangler { | |||
} | |||
/** | |||
* Create the old style (<1.6.9) format getter name which includes the aspect requesting access and the type containing the | |||
* field in the name of the type. At 1.6.9 and above the name is simply ajc$get$<fieldname> | |||
* Create the old style (<1.6.9) format getter name which includes the aspect requesting access and the type containing the | |||
* field in the name of the type. At 1.6.9 and above the name is simply ajc$get$<fieldname> | |||
*/ | |||
public static String privilegedAccessMethodForFieldGet(String name, UnresolvedType objectType, UnresolvedType aspectType) { | |||
StringBuilder nameBuilder = new StringBuilder(); | |||
@@ -124,8 +124,8 @@ public class NameMangler { | |||
} | |||
/** | |||
* Create the old style (<1.6.9) format setter name which includes the aspect requesting access and the type containing the | |||
* field in the name of the type. At 1.6.9 and above the name is simply ajc$set$<fieldname> | |||
* Create the old style (<1.6.9) format setter name which includes the aspect requesting access and the type containing the | |||
* field in the name of the type. At 1.6.9 and above the name is simply ajc$set$<fieldname> | |||
*/ | |||
public static String privilegedAccessMethodForFieldSet(String name, UnresolvedType objectType, UnresolvedType aspectType) { | |||
return makeName("privFieldSet", aspectType.getNameAsIdentifier(), objectType.getNameAsIdentifier(), name); |
@@ -20,7 +20,7 @@ import java.io.IOException; | |||
* | |||
* There are two syntax styles for field access, the older style was in use up to AspectJ 1.6.9 and involves long named getters and | |||
* setters which include the requesting aspect and the target type. The short style syntax is use from AspectJ 1.6.9 onwards is | |||
* simply 'ajc$get$<fieldname>' and 'ajc$set$<fieldname>' - as the requesting aspect isn't included in the name they can be shared | |||
* simply 'ajc$get$<fieldname>' and 'ajc$set$<fieldname>' - as the requesting aspect isn't included in the name they can be shared | |||
* across aspects. | |||
*/ | |||
public class PrivilegedAccessMunger extends ResolvedTypeMunger { |
@@ -462,8 +462,8 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso | |||
} | |||
/** | |||
* Return the member generic signature that would be suitable for inclusion in a class file Signature attribute. For: <T> | |||
* List<String> getThem(T t) {} we would create: <T:Ljava/lang/Object;>(TT;)Ljava/util/List<Ljava/lang/String;>;; | |||
* Return the member generic signature that would be suitable for inclusion in a class file Signature attribute. For: <T> | |||
* List<String> getThem(T t) {} we would create: <T:Ljava/lang/Object;>(TT;)Ljava/util/List<Ljava/lang/String;>;; | |||
* | |||
* @return the generic signature for the member that could be inserted into a class file | |||
*/ | |||
@@ -744,8 +744,8 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso | |||
/** | |||
* Return a resolvedmember in which all the type variables in the signature have been replaced with the given bindings. The | |||
* 'isParameterized' flag tells us whether we are creating a raw type version or not. if (isParameterized) then List<T> will | |||
* turn into List<String> (for example) - if (!isParameterized) then List<T> will turn into List. | |||
* 'isParameterized' flag tells us whether we are creating a raw type version or not. if (isParameterized) then List<T> will | |||
* turn into List<String> (for example) - if (!isParameterized) then List<T> will turn into List. | |||
*/ | |||
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, | |||
boolean isParameterized, List<String> aliases) { | |||
@@ -805,7 +805,7 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso | |||
/** | |||
* Replace occurrences of type variables in the signature with values contained in the map. The map is of the form | |||
* A=String,B=Integer and so a signature List<A> Foo.m(B i) {} would become List<String> Foo.m(Integer i) {} | |||
* A=String,B=Integer and so a signature List<A> Foo.m(B i) {} would become List<String> Foo.m(Integer i) {} | |||
*/ | |||
public ResolvedMember parameterizedWith(Map<String, UnresolvedType> m, World w) { | |||
// if (//isParameterized && <-- might need this bit... | |||
@@ -926,8 +926,8 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso | |||
} | |||
/** | |||
* If this member is defined by a parameterized super-type, return the erasure of that member. For example: interface I<T> { T | |||
* foo(T aTea); } class C implements I<String> { String foo(String aString) { return "something"; } } The resolved member for | |||
* If this member is defined by a parameterized super-type, return the erasure of that member. For example: interface I<T> { T | |||
* foo(T aTea); } class C implements I<String> { String foo(String aString) { return "something"; } } The resolved member for | |||
* C.foo has signature String foo(String). The erasure of that member is Object foo(Object) -- use upper bound of type variable. | |||
* A type is a supertype of itself. | |||
*/ |
@@ -690,7 +690,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl | |||
/** | |||
* Do the two members conflict? Due to the change in 1.7.1, field itds on interfaces now act like 'default' fields - so types implementing | |||
* those fields get the field if they don't have it already, otherwise they keep what they have. The conflict detection below had to be | |||
* altered. Previously (<1.7.1) it is not a conflict if the declaring types are different. With v2itds it may still be a conflict if the | |||
* altered. Previously (<1.7.1) it is not a conflict if the declaring types are different. With v2itds it may still be a conflict if the | |||
* declaring types are different. | |||
*/ | |||
public static boolean conflictingSignature(Member m1, Member m2, boolean v2itds) { | |||
@@ -1657,8 +1657,8 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl | |||
/** | |||
* Called for all type mungers but only does something if they share type variables with a generic type which they target. When | |||
* this happens this routine will check for the target type in the target hierarchy and 'bind' any type parameters as | |||
* appropriate. For example, for the ITD "List<T> I<T>.x" against a type like this: "class A implements I<String>" this routine | |||
* will return a parameterized form of the ITD "List<String> I.x" | |||
* appropriate. For example, for the ITD "List<T> I<T>.x" against a type like this: "class A implements I<String>" this routine | |||
* will return a parameterized form of the ITD "List<String> I.x" | |||
*/ | |||
public ConcreteTypeMunger fillInAnyTypeParameters(ConcreteTypeMunger munger) { | |||
boolean debug = false; |
@@ -414,7 +414,7 @@ public abstract class ResolvedTypeMunger { | |||
/** | |||
* return true if type variables are specified with the target type for this ITD. e.g. this would return true: | |||
* "int I<A,B>.m() { return 42; }" | |||
* "int I<A,B>.m() { return 42; }" | |||
*/ | |||
public boolean sharesTypeVariablesWithGenericType() { | |||
return (typeVariableAliases != null && typeVariableAliases.size() > 0); |
@@ -358,7 +358,7 @@ public class TypeFactory { | |||
/** | |||
* Create a signature then delegate to the other factory method. Same input/output: baseTypeSignature="LSomeType;" arguments[0]= | |||
* something with sig "Pcom/Foo<Ljava/lang/String;>;" signature created = "PSomeType<Pcom/Foo<Ljava/lang/String;>;>;" | |||
* something with sig "Pcom/Foo<Ljava/lang/String;>;" signature created = "PSomeType<Pcom/Foo<Ljava/lang/String;>;>;" | |||
*/ | |||
public static UnresolvedType createUnresolvedParameterizedType(String baseTypeSignature, UnresolvedType[] arguments) { | |||
StringBuffer parameterizedSig = new StringBuffer(); |
@@ -34,9 +34,9 @@ import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; | |||
* whether reweaving is allowed. The format in the data stream is: | |||
* | |||
* Byte: Kind. UNTOUCHED|WOVEN|EXTENDED - If extended it can have two extra bits set 'REWEAVABLE' and 'REWEAVABLE_COMPRESSION_BIT' | |||
* Short: typeMungerCount - how many type mungers have affected this type <UnresolvedType & ResolvedTypeMunger>: The type mungers | |||
* Short: typeMungerCount - how many type mungers have affected this type <UnresolvedType & ResolvedTypeMunger>: The type mungers | |||
* themselves If we are reweavable then we also have: Short: Number of aspects that touched this type in some way when it was | |||
* previously woven <String> The fully qualified name of each type Int: Length of class file data (i.e. the unwovenclassfile) | |||
* previously woven <String> The fully qualified name of each type Int: Length of class file data (i.e. the unwovenclassfile) | |||
* Byte[]: The class file data, compressed if REWEAVABLE_COMPRESSION_BIT set. | |||
* | |||
* @author Andy Clement |
@@ -24,7 +24,7 @@ import org.aspectj.weaver.VersionedDataInputStream; | |||
import org.aspectj.weaver.World; | |||
/** | |||
* left && right | |||
* left && right | |||
* | |||
* <p> | |||
* any binding to formals is explicitly forbidden for any composite by the language |
@@ -31,7 +31,7 @@ public abstract class AnnotationTypePattern extends PatternNode { | |||
private boolean isForParameterAnnotationMatch; | |||
/** | |||
* TODO: write, read, equals & hashCode both in annotation hierarchy and in altered TypePattern hierarchy | |||
* TODO: write, read, equals & hashCode both in annotation hierarchy and in altered TypePattern hierarchy | |||
*/ | |||
protected AnnotationTypePattern() { | |||
super(); | |||
@@ -155,4 +155,4 @@ class EllipsisAnnotationTypePattern extends AnnotationTypePattern { | |||
public void setForParameterAnnotationMatch() { | |||
} | |||
} | |||
} |
@@ -33,7 +33,7 @@ public class DeclareErrorOrWarning extends Declare { | |||
} | |||
/** | |||
* returns "declare warning: <message>" or "declare error: <message>" | |||
* returns "declare warning: <message>" or "declare error: <message>" | |||
*/ | |||
public String toString() { | |||
StringBuffer buf = new StringBuffer(); |
@@ -38,7 +38,7 @@ public class DeclareTypeErrorOrWarning extends Declare { | |||
} | |||
/** | |||
* returns "declare warning: <typepattern>: <message>" or "declare error: <typepattern>: <message>" | |||
* returns "declare warning: <typepattern>: <message>" or "declare error: <typepattern>: <message>" | |||
*/ | |||
public String toString() { | |||
StringBuffer buf = new StringBuffer(); |
@@ -1049,7 +1049,7 @@ public class PatternParser { | |||
} | |||
/** | |||
* Attempt to parse a typeIs(<category>) construct. If it cannot be parsed we just return null and that should cause the caller | |||
* Attempt to parse a typeIs(<category>) construct. If it cannot be parsed we just return null and that should cause the caller | |||
* to reset their position and attempt to consume it in another way. This means we won't have problems here: execution(* | |||
* typeIs(..)) because someone has decided to call a method the same as our construct. | |||
* |
@@ -17,9 +17,9 @@ import org.aspectj.weaver.ResolvedType; | |||
import org.aspectj.weaver.Shadow; | |||
/** | |||
* A visitor that turns a pointcut into a type pattern equivalent for a perthis or pertarget matching: - pertarget(target(Foo)) => | |||
* Foo+ (this one is a special case..) - pertarget(execution(* Foo.do()) => Foo - perthis(call(* Foo.do()) => * - perthis(!call(* | |||
* Foo.do()) => * (see how the ! has been absorbed here..) | |||
* A visitor that turns a pointcut into a type pattern equivalent for a perthis or pertarget matching: - pertarget(target(Foo)) → | |||
* Foo+ (this one is a special case..) - pertarget(execution(* Foo.do()) → Foo - perthis(call(* Foo.do()) → * - perthis(!call(* | |||
* Foo.do()) → * (see how the ! has been absorbed here..) | |||
* | |||
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> | |||
*/ |
@@ -244,7 +244,7 @@ public abstract class Pointcut extends PatternNode { | |||
* Resolves and removes ReferencePointcuts, replacing with basic ones | |||
* | |||
* @param inAspect the aspect to resolve relative to | |||
* @param bindings a Map from formal index in the current lexical context -> formal index in the concrete advice that will run | |||
* @param bindings a Map from formal index in the current lexical context → formal index in the concrete advice that will run | |||
* | |||
* This must always return a new Pointcut object (even if the concretized Pointcut is identical to the resolved one). | |||
* That behavior is assumed in many places. XXX fix implementors to handle state |
@@ -51,25 +51,25 @@ import org.aspectj.weaver.World; | |||
* Foo where Foo exists and is generic Parser creates WildTypePattern namePatterns={Foo} resolveBindings resolves Foo to RT(Foo - | |||
* raw) return ExactTypePattern(LFoo;) | |||
* | |||
* Foo<String> where Foo exists and String meets the bounds Parser creates WildTypePattern namePatterns = {Foo}, | |||
* Foo<String> where Foo exists and String meets the bounds Parser creates WildTypePattern namePatterns = {Foo}, | |||
* typeParameters=WTP{String} resolveBindings resolves typeParameters to ExactTypePattern(String) resolves Foo to RT(Foo) returns | |||
* ExactTypePattern(PFoo<String>; - parameterized) | |||
* ExactTypePattern(PFoo<String>; - parameterized) | |||
* | |||
* Foo<Str*> where Foo exists and takes one bound Parser creates WildTypePattern namePatterns = {Foo}, typeParameters=WTP{Str*} | |||
* Foo<Str*> where Foo exists and takes one bound Parser creates WildTypePattern namePatterns = {Foo}, typeParameters=WTP{Str*} | |||
* resolveBindings resolves typeParameters to WTP{Str*} resolves Foo to RT(Foo) returns WildTypePattern(name = Foo, typeParameters = | |||
* WTP{Str*} isGeneric=false) | |||
* | |||
* Fo*<String> Parser creates WildTypePattern namePatterns = {Fo*}, typeParameters=WTP{String} resolveBindings resolves | |||
* Fo*<String> Parser creates WildTypePattern namePatterns = {Fo*}, typeParameters=WTP{String} resolveBindings resolves | |||
* typeParameters to ETP{String} returns WildTypePattern(name = Fo*, typeParameters = ETP{String} isGeneric=false) | |||
* | |||
* | |||
* Foo<?> | |||
* Foo<?> | |||
* | |||
* Foo<? extends Number> | |||
* Foo<? extends Number> | |||
* | |||
* Foo<? extends Number+> | |||
* Foo<? extends Number+> | |||
* | |||
* Foo<? super Number> | |||
* Foo<? super Number> | |||
* | |||
*/ | |||
public class WildTypePattern extends TypePattern { |
@@ -183,7 +183,7 @@ public class Ajc extends DefaultCompilerAdapter { | |||
/** | |||
* Logs the compilation parameters, adds the files to compile and logs the | |||
* &qout;niceSourceList" | |||
* "niceSourceList" | |||
*/ | |||
@Override | |||
protected void logAndAddFilesToCompile(Commandline cmd) { |
@@ -2062,7 +2062,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { | |||
} | |||
/** | |||
* Returns a list of type variable aliases used in this munger. For example, if the ITD is 'int I<A,B>.m(List<A> las,List<B> | |||
* Returns a list of type variable aliases used in this munger. For example, if the ITD is 'int I<A,B>.m(List<A> las,List<B> | |||
* lbs) {}' then this returns a list containing the strings "A" and "B". | |||
*/ | |||
public List<String> getTypeVariableAliases() { |
@@ -48,7 +48,7 @@ public class AsmRelationshipUtils { | |||
} | |||
/** | |||
* Generates the pointcut details for the given pointcut, for example an anonymous pointcut will return '<anonymous pointcut>' | |||
* Generates the pointcut details for the given pointcut, for example an anonymous pointcut will return '<anonymous pointcut>' | |||
* and a named pointcut called p() will return 'p()..' | |||
*/ | |||
public static String genPointcutDetails(Pointcut pcd) { |
@@ -43,7 +43,7 @@ import org.aspectj.weaver.tools.TraceFactory; | |||
* </LI> | |||
* | |||
* <LI> | |||
* An "update index" {@link AsyncCommand} is posted to the background | |||
* An "update index" {@link AsyncCommand} is posted to the background | |||
* thread so that the newly mapped value will be persisted (eventually) | |||
* </LI> | |||
* </UL> |
@@ -24,7 +24,7 @@ import org.aspectj.util.FileUtil; | |||
import org.aspectj.util.LangUtil; | |||
/** | |||
* Uses a "flat" files model to store the cached instrumented classes | |||
* Uses a "flat" files model to store the cached instrumented classes | |||
* and aspects - i.e., each class/aspect is stored as a <U>separate</U> (binary) | |||
* file. This is a good mechanism when the number of instrumented class is | |||
* relatively small (a few 10's). The reason for it is that scanning a folder |