Browse Source

polish

tags/V1_9_6
Andy Clement 4 years ago
parent
commit
c3c07fdb4b
94 changed files with 586 additions and 479 deletions
  1. 5
    3
      ajde/src/main/java/org/aspectj/ajde/IconRegistry.java
  2. 8
    8
      ajde/src/main/java/org/aspectj/ajde/internal/BuildConfigManager.java
  3. 22
    22
      ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
  4. 38
    27
      ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java
  5. 2
    1
      ajde/src/main/java/org/aspectj/ajde/ui/AbstractIconRegistry.java
  6. 18
    19
      ajde/src/main/java/org/aspectj/ajde/ui/BuildConfigModel.java
  7. 2
    1
      ajde/src/main/java/org/aspectj/ajde/ui/IStructureViewNode.java
  8. 15
    15
      ajde/src/main/java/org/aspectj/ajde/ui/StructureSearchManager.java
  9. 10
    8
      ajde/src/main/java/org/aspectj/ajde/ui/StructureViewProperties.java
  10. 13
    3
      ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
  11. 1
    1
      ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaCompilerWarningsOptionsPanel.java
  12. 1
    1
      ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaComplianceOptionsPanel.java
  13. 1
    1
      ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaDebugOptionsPanel.java
  14. 8
    4
      ajde/src/main/java/org/aspectj/ajde/ui/swing/PointcutWizard.java
  15. 8
    3
      ajde/src/main/java/org/aspectj/ajde/ui/swing/SwingTreeViewNode.java
  16. 5
    2
      ajde/src/main/java/org/aspectj/ajde/ui/swing/SwingTreeViewNodeFactory.java
  17. 3
    4
      ajde/src/test/java/org/aspectj/ajde/AjdeTestCase.java
  18. 4
    3
      ajde/src/test/java/org/aspectj/ajde/internal/AspectJBuildManagerTest.java
  19. 2
    2
      ajde/src/test/java/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java
  20. 2
    2
      ajde/src/test/java/org/aspectj/ajde/ui/StructureSearchManagerTest.java
  21. 2
    2
      ajde/src/test/java/org/aspectj/ajde/ui/StructureViewManagerTest.java
  22. 5
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/CodeException.java
  23. 4
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/StackMapType.java
  24. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisAnnos.java
  25. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisParamAnnos.java
  26. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java
  27. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisAnnos.java
  28. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisParamAnnos.java
  29. 1
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java
  30. 0
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ReturnaddressType.java
  31. 0
    2
      bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java
  32. 2
    1
      bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ByteSequence.java
  33. 2
    2
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/AnnotationAccessFlagTest.java
  34. 1
    1
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/AnnotationGenTest.java
  35. 3
    3
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/BcelTestCase.java
  36. 2
    2
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/EnumAccessFlagTest.java
  37. 1
    1
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GeneratingAnnotatedClassesTest.java
  38. 2
    2
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/NonCachingClassLoaderRepositoryTest.java
  39. 1
    1
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java
  40. 1
    1
      bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java
  41. 1
    1
      loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java
  42. 2
    2
      loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
  43. 3
    3
      loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java
  44. 2
    2
      loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java
  45. 2
    2
      loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java
  46. 2
    2
      loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java
  47. 2
    4
      loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java
  48. 2
    2
      loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java
  49. 222
    211
      testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
  50. 1
    1
      util/src/main/java/org/aspectj/util/Reflection.java
  51. 6
    2
      util/src/main/java/org/aspectj/util/SoftHashMap.java
  52. 2
    1
      util/src/test/java/org/aspectj/util/UtilModuleTests.java
  53. 0
    2
      weaver/src/main/java/org/aspectj/weaver/bcel/BcelRenderer.java
  54. 0
    1
      weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java
  55. 0
    1
      weaver/src/main/java/org/aspectj/weaver/loadtime/definition/DocumentParser.java
  56. 0
    1
      weaver/src/main/java/org/aspectj/weaver/loadtime/definition/SimpleAOPParser.java
  57. 3
    3
      weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java
  58. 2
    2
      weaver/src/test/java/org/aspectj/weaver/AbstractTraceTest.java
  59. 2
    2
      weaver/src/test/java/org/aspectj/weaver/BoundedReferenceTypeTestCase.java
  60. 2
    2
      weaver/src/test/java/org/aspectj/weaver/CommonsTraceFactoryTest.java
  61. 2
    2
      weaver/src/test/java/org/aspectj/weaver/DumpTestCase.java
  62. 2
    2
      weaver/src/test/java/org/aspectj/weaver/GenericSignatureParserTest.java
  63. 2
    2
      weaver/src/test/java/org/aspectj/weaver/Jdk14TraceFactoryTest.java
  64. 2
    2
      weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java
  65. 2
    2
      weaver/src/test/java/org/aspectj/weaver/LocaleTest.java
  66. 2
    2
      weaver/src/test/java/org/aspectj/weaver/MemberTestCase.java
  67. 2
    2
      weaver/src/test/java/org/aspectj/weaver/ReferenceTypeTestCase.java
  68. 2
    2
      weaver/src/test/java/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java
  69. 2
    2
      weaver/src/test/java/org/aspectj/weaver/TypeVariableTestCase.java
  70. 2
    2
      weaver/src/test/java/org/aspectj/weaver/TypeXTestCase.java
  71. 52
    6
      weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java
  72. 2
    4
      weaver/src/test/java/org/aspectj/weaver/WeaverTestCase.java
  73. 1
    1
      weaver/src/test/java/org/aspectj/weaver/bcel/AfterWeaveTestCase.java
  74. 3
    3
      weaver/src/test/java/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java
  75. 2
    2
      weaver/src/test/java/org/aspectj/weaver/bcel/CheckerTestCase.java
  76. 2
    2
      weaver/src/test/java/org/aspectj/weaver/bcel/ClassLoaderRepositoryTest.java
  77. 1
    1
      weaver/src/test/java/org/aspectj/weaver/bcel/MegaZipTestCase.java
  78. 7
    2
      weaver/src/test/java/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java
  79. 1
    1
      weaver/src/test/java/org/aspectj/weaver/bcel/UtilityTestCase.java
  80. 8
    2
      weaver/src/test/java/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
  81. 1
    1
      weaver/src/test/java/org/aspectj/weaver/bcel/WorldTestCase.java
  82. 2
    2
      weaver/src/test/java/org/aspectj/weaver/bcel/ZipTestCase.java
  83. 3
    3
      weaver/src/test/java/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
  84. 3
    3
      weaver/src/test/java/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
  85. 3
    3
      weaver/src/test/java/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java
  86. 2
    2
      weaver/src/test/java/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
  87. 2
    3
      weaver/src/test/java/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java
  88. 2
    2
      weaver/src/test/java/org/aspectj/weaver/tools/PointcutDesignatorHandlerTest.java
  89. 2
    2
      weaver/src/test/java/org/aspectj/weaver/tools/PointcutExpressionTest.java
  90. 3
    3
      weaver/src/test/java/org/aspectj/weaver/tools/PointcutParserTest.java
  91. 2
    2
      weaver/src/test/java/org/aspectj/weaver/tools/ReadingAttributesTest.java
  92. 2
    2
      weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java
  93. 2
    2
      weaver/src/test/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolverTest.java
  94. 2
    1
      weaver/src/test/java/test/A3.java

+ 5
- 3
ajde/src/main/java/org/aspectj/ajde/IconRegistry.java View File



import java.net.URL; import java.net.URL;


import javax.swing.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;


import org.aspectj.ajde.ui.*;
import org.aspectj.asm.*;
import org.aspectj.ajde.ui.AbstractIcon;
import org.aspectj.ajde.ui.AbstractIconRegistry;
import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;


/** /**
* Default icons. Override behavior for custom icons. * Default icons. Override behavior for custom icons.

+ 8
- 8
ajde/src/main/java/org/aspectj/ajde/internal/BuildConfigManager.java View File

/** /**
* Add a listner that will be notified of build configuration change events * Add a listner that will be notified of build configuration change events
*/ */
public void addListener(BuildConfigListener configurationListener);
public void addListener(BuildConfigListener configurationListener);


/** /**
* Remove a configuration listener. * Remove a configuration listener.
*/ */
public void removeListener(BuildConfigListener configurationListener);
public void removeListener(BuildConfigListener configurationListener);


/**
* Build a model for the corresponding configuration file.
*
* @param full path to the file
*/
/**
* Build a model for the corresponding configuration file.
*
* @param full path to the file
*/
public BuildConfigModel buildModel(String configFilePath); public BuildConfigModel buildModel(String configFilePath);


/** /**
* Write a list of source files into a configuration file. File paths will be * Write a list of source files into a configuration file. File paths will be
* written relative to the path of the configuration file. * written relative to the path of the configuration file.
*/ */
public void writePaths(String configFilePath, List paths);
public void writePaths(String configFilePath, List<String> paths);


/** /**
* Add files to a configuration. * Add files to a configuration.

+ 22
- 22
ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java View File

/* ******************************************************************* /* *******************************************************************
* Copyright (c) 1999-2001 Xerox Corporation,
* Copyright (c) 1999-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC). * 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* Helen Hawkins Converted to new interface (bug 148190) * Helen Hawkins Converted to new interface (bug 148190)
* ******************************************************************/ * ******************************************************************/




/** /**
* Used for reading and writing build configuration (".lst") files. * Used for reading and writing build configuration (".lst") files.
*
*
* @author Mik Kersten * @author Mik Kersten
*/ */
class LstBuildConfigFileUpdater { class LstBuildConfigFileUpdater {
* Adds an entry to a build configuration file. * Adds an entry to a build configuration file.
*/ */
public void updateBuildConfigFile(String buildConfigFile, String update, boolean addToConfiguration) { public void updateBuildConfigFile(String buildConfigFile, String update, boolean addToConfiguration) {
List fileContents = readConfigFile(buildConfigFile);
List<String> fileContents = readConfigFile(buildConfigFile);
if (addToConfiguration) { if (addToConfiguration) {
fileContents.add(update); fileContents.add(update);
} else { } else {
return null; return null;
} }


public void writeConfigFile(String filePath, List files, List importedNodes) {
public void writeConfigFile(String filePath, List<BuildConfigNode> files, List<BuildConfigNode> importedNodes) {
// Set contentsSet = new TreeSet(fileContents); // Set contentsSet = new TreeSet(fileContents);
String fileContentsString = ""; String fileContentsString = "";
// List filesToWrite = null; // List filesToWrite = null;
Set includedFiles = new HashSet();
for (Iterator it = importedNodes.iterator(); it.hasNext();) {
BuildConfigNode node = (BuildConfigNode) it.next();
Set<String> includedFiles = new HashSet<>();
for (Iterator<BuildConfigNode> it = importedNodes.iterator(); it.hasNext();) {
BuildConfigNode node = it.next();
fileContentsString += '@' + node.getResourcePath() + "\n"; fileContentsString += '@' + node.getResourcePath() + "\n";
String parentPath = new File(filePath).getParent(); String parentPath = new File(filePath).getParent();
String importedFilePath = parentPath + File.separator + node.getResourcePath(); String importedFilePath = parentPath + File.separator + node.getResourcePath();
includedFiles.addAll(getIncludedFiles(importedFilePath, parentPath)); includedFiles.addAll(getIncludedFiles(importedFilePath, parentPath));
} }


for (Iterator it = files.iterator(); it.hasNext();) {
BuildConfigNode node = (BuildConfigNode) it.next();
for (Iterator<BuildConfigNode> it = files.iterator(); it.hasNext();) {
BuildConfigNode node = it.next();
if (node.getName().endsWith(".lst") && !node.getResourcePath().startsWith("..")) { if (node.getName().endsWith(".lst") && !node.getResourcePath().startsWith("..")) {
fileContentsString += '@'; fileContentsString += '@';
fileContentsString += node.getResourcePath() + "\n"; fileContentsString += node.getResourcePath() + "\n";
List<File> files = configParser.getFiles(); List<File> files = configParser.getFiles();
List<String> relativeFiles = new ArrayList<String>(); List<String> relativeFiles = new ArrayList<String>();
for (Iterator<File> it = files.iterator(); it.hasNext();) { for (Iterator<File> it = files.iterator(); it.hasNext();) {
relativeFiles.add(relativizePath(((File) it.next()).getPath(), rootPath));
relativeFiles.add(relativizePath(it.next().getPath(), rootPath));
} }
return relativeFiles; return relativeFiles;
} catch (ConfigParser.ParseException pe) { } catch (ConfigParser.ParseException pe) {


/** /**
* Sorts and does not write duplicates. * Sorts and does not write duplicates.
*
*
* @param fileContents full paths representing file entries * @param fileContents full paths representing file entries
*/ */
public void writeConfigFile(String filePath, List fileContents) {
Set contentsSet = new TreeSet(fileContents);
public void writeConfigFile(String filePath, List<String> fileContents) {
Set<String> contentsSet = new TreeSet<>(fileContents);
StringBuffer fileContentsSB = new StringBuffer(); StringBuffer fileContentsSB = new StringBuffer();
Iterator it = contentsSet.iterator();
Iterator<String> it = contentsSet.iterator();
while (it.hasNext()) { while (it.hasNext()) {
fileContentsSB.append(it.next().toString()); fileContentsSB.append(it.next().toString());
fileContentsSB.append("\n"); fileContentsSB.append("\n");

+ 38
- 27
ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java View File

*/ */
public class LstBuildConfigManager implements BuildConfigManager { public class LstBuildConfigManager implements BuildConfigManager {



private List<String> allBuildConfigFiles; private List<String> allBuildConfigFiles;
private List<BuildConfigListener> listeners = new ArrayList<BuildConfigListener>(); private List<BuildConfigListener> listeners = new ArrayList<BuildConfigListener>();
private LstBuildConfigFileUpdater fileUpdater = new LstBuildConfigFileUpdater(); private LstBuildConfigFileUpdater fileUpdater = new LstBuildConfigFileUpdater();
protected String currConfigFilePath = null; protected String currConfigFilePath = null;


private static final FilenameFilter SOURCE_FILE_FILTER = new FilenameFilter() { private static final FilenameFilter SOURCE_FILE_FILTER = new FilenameFilter() {
@Override
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return FileUtil.hasSourceSuffix(name) || name.endsWith(".lst"); return FileUtil.hasSourceSuffix(name) || name.endsWith(".lst");
} }
}; };


private static final FileFilter DIR_FILTER = new FileFilter() { private static final FileFilter DIR_FILTER = new FileFilter() {
@Override
public boolean accept(File file) { public boolean accept(File file) {
return file.isDirectory(); return file.isDirectory();
} }
}; };


@Override
public BuildConfigModel buildModel(String configFilePath) { public BuildConfigModel buildModel(String configFilePath) {
File configFile = new File(configFilePath); File configFile = new File(configFilePath);
String rootPath = configFile.getParent(); String rootPath = configFile.getParent();
return model; return model;
} }


private void addProblemEntries(BuildConfigNode root, List badEntries) {
for (Iterator it = badEntries.iterator(); it.hasNext();) {
root.addChild(new BuildConfigNode(it.next().toString(), BuildConfigNode.Kind.ERROR, null));
private void addProblemEntries(BuildConfigNode root, List<String> badEntries) {
for (String string : badEntries) {
root.addChild(new BuildConfigNode(string.toString(), BuildConfigNode.Kind.ERROR, null));
} }
} }


@Override
public void writeModel(BuildConfigModel model) { public void writeModel(BuildConfigModel model) {
// final List paths = new ArrayList(); // final List paths = new ArrayList();
// StructureWalker walker = new StructureWalker() { // StructureWalker walker = new StructureWalker() {
fileUpdater.writeConfigFile(model.getSourceFile(), activeSourceFiles, activeImportedFiles); fileUpdater.writeConfigFile(model.getSourceFile(), activeSourceFiles, activeImportedFiles);
} }


public void writePaths(String configFilePath, List files) {
@Override
public void writePaths(String configFilePath, List<String> files) {
fileUpdater.writeConfigFile(configFilePath, files); fileUpdater.writeConfigFile(configFilePath, files);
} }


@Override
public void addFilesToConfig(String configFilePath, List paths) { public void addFilesToConfig(String configFilePath, List paths) {


} }


@Override
public void removeFilesFromConfig(String configFilePath, List files) { public void removeFilesFromConfig(String configFilePath, List files) {


} }
File[] dirs = new File(node.getResourcePath()).listFiles(DIR_FILTER); File[] dirs = new File(node.getResourcePath()).listFiles(DIR_FILTER);
if (dirs == null) if (dirs == null)
return; return;
for (int i = 0; i < dirs.length; i++) {
BuildConfigNode dir = new BuildConfigNode(dirs[i].getName(), BuildConfigNode.Kind.DIRECTORY, dirs[i].getPath());
File[] files = dirs[i].listFiles(SOURCE_FILE_FILTER);
for (int j = 0; j < files.length; j++) {
if (files[j] != null) {// && !files[j].getName().endsWith(".lst")) {
String filePath = fileUpdater.relativizePath(files[j].getPath(), rootPath);
for (File dir2 : dirs) {
BuildConfigNode dir = new BuildConfigNode(dir2.getName(), BuildConfigNode.Kind.DIRECTORY, dir2.getPath());
File[] files = dir2.listFiles(SOURCE_FILE_FILTER);
for (File file2 : files) {
if (file2 != null) {// && !files[j].getName().endsWith(".lst")) {
String filePath = fileUpdater.relativizePath(file2.getPath(), rootPath);
BuildConfigNode.Kind kind = BuildConfigNode.Kind.FILE_JAVA; BuildConfigNode.Kind kind = BuildConfigNode.Kind.FILE_JAVA;
if (!files[j].getName().endsWith(".lst")) {
if (!file2.getName().endsWith(".lst")) {
// kind = BuildConfigNode.Kind.FILE_LST; // kind = BuildConfigNode.Kind.FILE_LST;
BuildConfigNode file = new BuildConfigNode(files[j].getName(), kind, filePath);
BuildConfigNode file = new BuildConfigNode(file2.getName(), kind, filePath);
file.setActive(false); file.setActive(false);
dir.addChild(file); dir.addChild(file);
} }
// boolean foundMatch = false; // boolean foundMatch = false;
for (Iterator it = importedFiles.iterator(); it.hasNext();) { for (Iterator it = importedFiles.iterator(); it.hasNext();) {
File importedFile = (File) it.next(); File importedFile = (File) it.next();
if (importedFile.getParentFile().getAbsolutePath().equals(dirs[i].getAbsolutePath())) {
if (importedFile.getParentFile().getAbsolutePath().equals(dir2.getAbsolutePath())) {
// foundMatch = true; // foundMatch = true;
BuildConfigNode importedFileNode = new BuildConfigNode(importedFile.getName(), BuildConfigNode.Kind.FILE_LST, BuildConfigNode importedFileNode = new BuildConfigNode(importedFile.getName(), BuildConfigNode.Kind.FILE_LST,
fileUpdater.relativizePath(importedFile.getPath(), rootPath)); fileUpdater.relativizePath(importedFile.getPath(), rootPath));
importedFileNode.setActive(true); importedFileNode.setActive(true);
// dir.getChildren().clear(); // dir.getChildren().clear();
boolean found = false; boolean found = false;
for (Iterator it2 = dir.getChildren().iterator(); it2.hasNext();) {
if (((BuildConfigNode) it2.next()).getName().equals(importedFile.getName())) {
for (BuildConfigNode buildConfigNode : dir.getChildren()) {
if (buildConfigNode.getName().equals(importedFile.getName())) {
found = true; found = true;
} }
} }
File[] files = new File(rootPath).listFiles(SOURCE_FILE_FILTER); File[] files = new File(rootPath).listFiles(SOURCE_FILE_FILTER);
if (files == null) if (files == null)
return; return;
for (int i = 0; i < files.length; i++) {
if (files[i] != null && !files[i].getName().equals(configFileName)) {// && !files[i].getName().endsWith(".lst")) {
for (File file2 : files) {
if (file2 != null && !file2.getName().equals(configFileName)) {// && !files[i].getName().endsWith(".lst")) {
BuildConfigNode.Kind kind = BuildConfigNode.Kind.FILE_JAVA; BuildConfigNode.Kind kind = BuildConfigNode.Kind.FILE_JAVA;
if (files[i].getName().endsWith(".lst")) {
if (file2.getName().endsWith(".lst")) {
kind = BuildConfigNode.Kind.FILE_LST; kind = BuildConfigNode.Kind.FILE_LST;
} }
BuildConfigNode file = new BuildConfigNode(files[i].getName(), kind, files[i].getName());
BuildConfigNode file = new BuildConfigNode(file2.getName(), kind, file2.getName());
file.setActive(false); file.setActive(false);
node.addChild(file); node.addChild(file);
} }


private boolean pruneEmptyDirs(BuildConfigNode node) { private boolean pruneEmptyDirs(BuildConfigNode node) {
List<BuildConfigNode> nodesToRemove = new ArrayList<>(); List<BuildConfigNode> nodesToRemove = new ArrayList<>();
for (Iterator<BuildConfigNode> it = node.getChildren().iterator(); it.hasNext();) {
BuildConfigNode currNode = it.next();
for (BuildConfigNode currNode : node.getChildren()) {
boolean hasValidChildren = pruneEmptyDirs(currNode); boolean hasValidChildren = pruneEmptyDirs(currNode);
if (!currNode.isValidResource() && !hasValidChildren) { if (!currNode.isValidResource() && !hasValidChildren) {
nodesToRemove.add(currNode); nodesToRemove.add(currNode);
} }
} }


for (Iterator<BuildConfigNode> it = nodesToRemove.iterator(); it.hasNext();) {
BuildConfigNode currNode = it.next();
for (BuildConfigNode currNode : nodesToRemove) {
node.removeChild(currNode); node.removeChild(currNode);
} }
return node.getChildren().size() > 0; return node.getChildren().size() > 0;
} }


@Override
public String getActiveConfigFile() { public String getActiveConfigFile() {
return currConfigFilePath; return currConfigFilePath;
} }


@Override
public void setActiveConfigFile(String currConfigFilePath) { public void setActiveConfigFile(String currConfigFilePath) {
if (currConfigFilePath == null) if (currConfigFilePath == null)
return; return;
notifyConfigChanged(); notifyConfigChanged();
} }


@Override
public void addListener(BuildConfigListener configurationListener) { public void addListener(BuildConfigListener configurationListener) {
listeners.add(configurationListener); listeners.add(configurationListener);
} }


@Override
public void removeListener(BuildConfigListener configurationListener) { public void removeListener(BuildConfigListener configurationListener) {
listeners.remove(configurationListener); listeners.remove(configurationListener);
} }


private void notifyConfigChanged() { private void notifyConfigChanged() {
for (Iterator it = listeners.iterator(); it.hasNext();) {
((BuildConfigListener) it.next()).currConfigChanged(currConfigFilePath);
for (Object element : listeners) {
((BuildConfigListener) element).currConfigChanged(currConfigFilePath);
} }
} }


if (node == null || node.getChildren() == null) if (node == null || node.getChildren() == null)
return; return;
Collections.sort(node.getChildren(), comparator); Collections.sort(node.getChildren(), comparator);
for (Iterator<BuildConfigNode> it = node.getChildren().iterator(); it.hasNext();) {
BuildConfigNode nextNode = it.next();
for (BuildConfigNode nextNode : node.getChildren()) {
if (nextNode != null) if (nextNode != null)
sortModel(nextNode, comparator); sortModel(nextNode, comparator);
} }
} }


private static final Comparator<BuildConfigNode> ALPHABETICAL_COMPARATOR = new Comparator<BuildConfigNode>() { private static final Comparator<BuildConfigNode> ALPHABETICAL_COMPARATOR = new Comparator<BuildConfigNode>() {
@Override
public int compare(BuildConfigNode n1, BuildConfigNode n2) { public int compare(BuildConfigNode n1, BuildConfigNode n2) {
return n1.getName().compareTo(n2.getName()); return n1.getName().compareTo(n2.getName());
} }
}; };


@Override
public List<String> getAllBuildConfigFiles() { public List<String> getAllBuildConfigFiles() {
if (allBuildConfigFiles == null) { if (allBuildConfigFiles == null) {
allBuildConfigFiles = new ArrayList<String>(); allBuildConfigFiles = new ArrayList<String>();

+ 2
- 1
ajde/src/main/java/org/aspectj/ajde/ui/AbstractIconRegistry.java View File



package org.aspectj.ajde.ui; package org.aspectj.ajde.ui;


import org.aspectj.asm.*;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;


/** /**
* Uses the factory pattern. * Uses the factory pattern.

+ 18
- 19
ajde/src/main/java/org/aspectj/ajde/ui/BuildConfigModel.java View File

/* ******************************************************************* /* *******************************************************************
* Copyright (c) 1999-2001 Xerox Corporation,
* Copyright (c) 1999-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC). * 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* ******************************************************************/ * ******************************************************************/


package org.aspectj.ajde.ui; package org.aspectj.ajde.ui;


import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.StringTokenizer; import java.util.StringTokenizer;


/** /**
* TODO: we have schitzophrenia between BuildConfigNode(s) and IProgramElement(s), fix. * TODO: we have schitzophrenia between BuildConfigNode(s) and IProgramElement(s), fix.
*
*
* @author Mik Kersten * @author Mik Kersten
*/ */
public class BuildConfigModel { public class BuildConfigModel {
private BuildConfigNode getNodeForPathHelper(StringTokenizer st, BuildConfigNode node) { private BuildConfigNode getNodeForPathHelper(StringTokenizer st, BuildConfigNode node) {
BuildConfigNode parent = node; BuildConfigNode parent = node;
while (st.hasMoreElements()) { while (st.hasMoreElements()) {
String pathItem = (String) st.nextElement();
for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
node = (BuildConfigNode) it.next();
String pathItem = st.nextToken();
for (BuildConfigNode element : node.getChildren()) {
node = element;
String childName = node.getName(); String childName = node.getName();
if (childName.equals(pathItem)) { if (childName.equals(pathItem)) {
return getNodeForPathHelper(st, node); return getNodeForPathHelper(st, node);
} }


if (node != null && node.getChildren() != null) { if (node != null && node.getChildren() != null) {
for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
BuildConfigNode foundNode = findNodeForSourceLineHelper((BuildConfigNode) it.next(), sourceFilePath, lineNumber);
for (Object element : node.getChildren()) {
BuildConfigNode foundNode = findNodeForSourceLineHelper((BuildConfigNode) element, sourceFilePath, lineNumber);
if (foundNode != null) if (foundNode != null)
return foundNode; return foundNode;
} }
} }


private boolean hasMoreSpecificChild(BuildConfigNode node, String sourceFilePath, int lineNumber) { private boolean hasMoreSpecificChild(BuildConfigNode node, String sourceFilePath, int lineNumber) {
for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
BuildConfigNode child = (BuildConfigNode) it.next();
if (matches(child, sourceFilePath, lineNumber))
for (BuildConfigNode child : node.getChildren()) {
if (matches(child, sourceFilePath, lineNumber)) {
return true; return true;
}
} }
return false; return false;
} }

+ 2
- 1
ajde/src/main/java/org/aspectj/ajde/ui/IStructureViewNode.java View File

package org.aspectj.ajde.ui; package org.aspectj.ajde.ui;


import java.io.*;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.List; import java.util.List;


import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IProgramElement;

+ 15
- 15
ajde/src/main/java/org/aspectj/ajde/ui/StructureSearchManager.java View File

/* ******************************************************************* /* *******************************************************************
* Copyright (c) 1999-2001 Xerox Corporation,
* Copyright (c) 1999-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC). * 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation * Xerox/PARC initial implementation
* Helen Hawkins Converted to new interface (bug 148190)
* Helen Hawkins Converted to new interface (bug 148190)
* ******************************************************************/ * ******************************************************************/


package org.aspectj.ajde.ui; package org.aspectj.ajde.ui;


/** /**
* @param pattern case-sensitive substring of node name * @param pattern case-sensitive substring of node name
*
*
* @return null if a corresponding node was not found * @return null if a corresponding node was not found
*/ */
public List findMatches(String pattern, IProgramElement.Kind kind) {
public List<IProgramElement> findMatches(String pattern, IProgramElement.Kind kind) {


List matches = new ArrayList();
List<IProgramElement> matches = new ArrayList<>();
IHierarchy model = AsmManager.lastActiveStructureModel.getHierarchy(); IHierarchy model = AsmManager.lastActiveStructureModel.getHierarchy();
if (model.getRoot().equals(IHierarchy.NO_STRUCTURE)) { if (model.getRoot().equals(IHierarchy.NO_STRUCTURE)) {
return null; return null;
} }
} }


private List findMatchesHelper(IProgramElement node, String pattern, IProgramElement.Kind kind, List matches) {
private List<IProgramElement> findMatchesHelper(IProgramElement node, String pattern, IProgramElement.Kind kind, List<IProgramElement> matches) {


if (node != null && node.getName().indexOf(pattern) != -1) { if (node != null && node.getName().indexOf(pattern) != -1) {
if (kind == null || node.getKind().equals(kind)) { if (kind == null || node.getKind().equals(kind)) {
} }
} }
if (node != null && node.getChildren() != null) { if (node != null && node.getChildren() != null) {
for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
IProgramElement nextNode = (IProgramElement) it.next();
for (Iterator<IProgramElement> it = node.getChildren().iterator(); it.hasNext();) {
IProgramElement nextNode = it.next();
if (nextNode != null) { if (nextNode != null) {
findMatchesHelper(nextNode, pattern, kind, matches); findMatchesHelper(nextNode, pattern, kind, matches);
} }

+ 10
- 8
ajde/src/main/java/org/aspectj/ajde/ui/StructureViewProperties.java View File

import java.util.List; import java.util.List;


import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IProgramElement.Accessibility;
import org.aspectj.asm.IProgramElement.Modifiers;
import org.aspectj.asm.IRelationship; import org.aspectj.asm.IRelationship;


/** /**
relations.remove(kind); relations.remove(kind);
} }


public void setFilteredMemberAccessibility(List memberVisibility) {
public void setFilteredMemberAccessibility(List<Accessibility> memberVisibility) {
this.filteredMemberAccessibility = memberVisibility; this.filteredMemberAccessibility = memberVisibility;
} }


public List getFilteredMemberAccessibility() {
public List<Accessibility> getFilteredMemberAccessibility() {
return filteredMemberAccessibility; return filteredMemberAccessibility;
} }


this.filteredMemberAccessibility.remove(accessibility); this.filteredMemberAccessibility.remove(accessibility);
} }


public List getFilteredMemberModifiers() {
public List<Modifiers> getFilteredMemberModifiers() {
return filteredMemberModifiers; return filteredMemberModifiers;
} }


public void setFilteredMemberModifiers(List memberModifiers) {
public void setFilteredMemberModifiers(List<Modifiers> memberModifiers) {
this.filteredMemberModifiers = memberModifiers; this.filteredMemberModifiers = memberModifiers;
} }


this.sorting = sorting; this.sorting = sorting;
} }


public List getFilteredMemberKinds() {
public List<IProgramElement.Kind> getFilteredMemberKinds() {
return filteredMemberKinds; return filteredMemberKinds;
} }


public void setFilteredMemberKinds(List memberKinds) {
public void setFilteredMemberKinds(List<IProgramElement.Kind> memberKinds) {
this.filteredMemberKinds = memberKinds; this.filteredMemberKinds = memberKinds;
} }


this.filteredMemberKinds.remove(kind); this.filteredMemberKinds.remove(kind);
} }


public List getGrouping() {
public List<Grouping> getGrouping() {
return grouping; return grouping;
} }


public void setGrouping(List grouping) {
public void setGrouping(List<Grouping> grouping) {
this.grouping = grouping; this.grouping = grouping;
} }



+ 13
- 3
ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java View File



package org.aspectj.ajde.ui.internal; package org.aspectj.ajde.ui.internal;


import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;


import org.aspectj.ajde.ui.*;
import org.aspectj.asm.*;
import org.aspectj.ajde.ui.FileStructureView;
import org.aspectj.ajde.ui.GlobalStructureView;
import org.aspectj.ajde.ui.IStructureViewNode;
import org.aspectj.ajde.ui.StructureView;
import org.aspectj.ajde.ui.StructureViewNodeFactory;
import org.aspectj.ajde.ui.StructureViewProperties;
//import org.aspectj.asm.internal.*; //import org.aspectj.asm.internal.*;
//import org.aspectj.asm.internal.ProgramElement; //import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;


/** /**
* @author Mik Kersten * @author Mik Kersten

+ 1
- 1
ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaCompilerWarningsOptionsPanel.java View File

import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;


import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Box; import javax.swing.Box;

+ 1
- 1
ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaComplianceOptionsPanel.java View File

import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;


import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Box; import javax.swing.Box;

+ 1
- 1
ajde/src/main/java/org/aspectj/ajde/ui/javaoptions/JavaDebugOptionsPanel.java View File

import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;


import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Box; import javax.swing.Box;

+ 8
- 4
ajde/src/main/java/org/aspectj/ajde/ui/swing/PointcutWizard.java View File



package org.aspectj.ajde.ui.swing; package org.aspectj.ajde.ui.swing;


import java.awt.*;
import java.awt.BorderLayout;
//import java.awt.event.ActionEvent; //import java.awt.event.ActionEvent;
import java.util.*;
import java.util.ArrayList;


import javax.swing.*;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;


import org.aspectj.ajde.ui.*;
//import org.aspectj.asm.IRelationship; //import org.aspectj.asm.IRelationship;
import org.aspectj.ajde.ui.StructureViewProperties;


/** /**
* @author Mik Kersten * @author Mik Kersten

+ 8
- 3
ajde/src/main/java/org/aspectj/ajde/ui/swing/SwingTreeViewNode.java View File



package org.aspectj.ajde.ui.swing; package org.aspectj.ajde.ui.swing;


import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;


import org.aspectj.ajde.ui.*;
import org.aspectj.ajde.ui.AbstractIcon;
import org.aspectj.ajde.ui.IStructureViewNode;
import org.aspectj.ajde.ui.StructureViewNodeFactory;
//import org.aspectj.ajde.ui.IStructureViewNode.Kind; //import org.aspectj.ajde.ui.IStructureViewNode.Kind;
import org.aspectj.asm.*;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;


/** /**
* @author Mik Kersten * @author Mik Kersten

+ 5
- 2
ajde/src/main/java/org/aspectj/ajde/ui/swing/SwingTreeViewNodeFactory.java View File

import java.util.List; import java.util.List;


import org.aspectj.ajde.IconRegistry; import org.aspectj.ajde.IconRegistry;
import org.aspectj.ajde.ui.*;
import org.aspectj.asm.*;
import org.aspectj.ajde.ui.AbstractIcon;
import org.aspectj.ajde.ui.IStructureViewNode;
import org.aspectj.ajde.ui.StructureViewNodeFactory;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;


/** /**
* @author Mik Kersten * @author Mik Kersten

+ 3
- 4
ajde/src/test/java/org/aspectj/ajde/AjdeTestCase.java View File

import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;


import junit.framework.AssertionFailedError;
import junit.framework.TestCase;

import org.aspectj.ajde.core.AjCompiler; import org.aspectj.ajde.core.AjCompiler;
import org.aspectj.ajde.ui.utils.TestBuildProgressMonitor; import org.aspectj.ajde.ui.utils.TestBuildProgressMonitor;
import org.aspectj.ajde.ui.utils.TestCompilerConfiguration; import org.aspectj.ajde.ui.utils.TestCompilerConfiguration;
import org.aspectj.ajde.ui.utils.TestMessageHandler; import org.aspectj.ajde.ui.utils.TestMessageHandler;
import org.aspectj.ajde.ui.utils.TestRuntimeProperties; import org.aspectj.ajde.ui.utils.TestRuntimeProperties;
import org.aspectj.testing.util.TestUtil; import org.aspectj.testing.util.TestUtil;
import org.aspectj.tools.ajc.Ajc;

import junit.framework.AssertionFailedError;
import junit.framework.TestCase;


public abstract class AjdeTestCase extends TestCase { public abstract class AjdeTestCase extends TestCase {



+ 4
- 3
ajde/src/test/java/org/aspectj/ajde/internal/AspectJBuildManagerTest.java View File



package org.aspectj.ajde.internal; package org.aspectj.ajde.internal;


import junit.framework.*;
import org.aspectj.ajde.*;
import java.io.File;

import org.aspectj.ajde.AjdeTestCase;
import org.aspectj.asm.AsmManager; import org.aspectj.asm.AsmManager;


import java.io.*;
import junit.framework.TestSuite;


/** /**
* @author Mik Kersten * @author Mik Kersten

+ 2
- 2
ajde/src/test/java/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java View File

import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;


import junit.framework.TestSuite;

import org.aspectj.ajde.AjdeTestCase; import org.aspectj.ajde.AjdeTestCase;
import org.aspectj.ajde.ui.BuildConfigModel; import org.aspectj.ajde.ui.BuildConfigModel;
import org.aspectj.ajde.ui.utils.TestMessageHandler.TestMessage; import org.aspectj.ajde.ui.utils.TestMessageHandler.TestMessage;


import junit.framework.TestSuite;

public class LstBuildConfigManagerTest extends AjdeTestCase { public class LstBuildConfigManagerTest extends AjdeTestCase {
private BuildConfigManager buildConfigManager = new LstBuildConfigManager(); private BuildConfigManager buildConfigManager = new LstBuildConfigManager();

+ 2
- 2
ajde/src/test/java/org/aspectj/ajde/ui/StructureSearchManagerTest.java View File



import java.util.List; import java.util.List;


import junit.framework.TestSuite;

import org.aspectj.ajde.Ajde; import org.aspectj.ajde.Ajde;
import org.aspectj.ajde.AjdeTestCase; import org.aspectj.ajde.AjdeTestCase;
import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IProgramElement;


import junit.framework.TestSuite;

/** /**
* @author Mik Kersten * @author Mik Kersten
*/ */

+ 2
- 2
ajde/src/test/java/org/aspectj/ajde/ui/StructureViewManagerTest.java View File

import java.io.File; import java.io.File;
import java.util.Iterator; import java.util.Iterator;


import junit.framework.TestSuite;

import org.aspectj.ajde.Ajde; import org.aspectj.ajde.Ajde;
import org.aspectj.ajde.AjdeTestCase; import org.aspectj.ajde.AjdeTestCase;
import org.aspectj.asm.AsmManager; import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IProgramElement;


import junit.framework.TestSuite;

/** /**
* @author Mik Kersten * @author Mik Kersten
*/ */

+ 5
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/CodeException.java View File

package org.aspectj.apache.bcel.classfile; package org.aspectj.apache.bcel.classfile;


import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;

/* ==================================================================== /* ====================================================================
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
*/ */


import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import java.io.*;


/** /**
* This class represents an entry in the exception table of the <em>Code</em> * This class represents an entry in the exception table of the <em>Code</em>

+ 4
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/StackMapType.java View File

package org.aspectj.apache.bcel.classfile; package org.aspectj.apache.bcel.classfile;


import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/* ==================================================================== /* ====================================================================
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
*/ */


import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import java.io.*;


/** /**
* This class represents the type of a local variable or item on stack * This class represents the type of a local variable or item on stack

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisAnnos.java View File



import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeInvisAnnos extends RuntimeAnnos { public class RuntimeInvisAnnos extends RuntimeAnnos {

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisParamAnnos.java View File



import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeInvisParamAnnos extends RuntimeParamAnnos { public class RuntimeInvisParamAnnos extends RuntimeParamAnnos {

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java View File

import java.io.IOException; import java.io.IOException;


import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeInvisTypeAnnos extends RuntimeTypeAnnos { public class RuntimeInvisTypeAnnos extends RuntimeTypeAnnos {



+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisAnnos.java View File



import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeVisAnnos extends RuntimeAnnos { public class RuntimeVisAnnos extends RuntimeAnnos {

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisParamAnnos.java View File



import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeVisParamAnnos extends RuntimeParamAnnos { public class RuntimeVisParamAnnos extends RuntimeParamAnnos {

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java View File

import java.io.IOException; import java.io.IOException;


import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.ClassVisitor; import org.aspectj.apache.bcel.classfile.ClassVisitor;
import org.aspectj.apache.bcel.classfile.ConstantPool;


public class RuntimeVisTypeAnnos extends RuntimeTypeAnnos { public class RuntimeVisTypeAnnos extends RuntimeTypeAnnos {

+ 0
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ReturnaddressType.java View File

* <http://www.apache.org/>. * <http://www.apache.org/>.
*/ */
import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.generic.InstructionHandle;


/** /**
* Returnaddress, the type JSR or JSR_W instructions push upon the stack. * Returnaddress, the type JSR or JSR_W instructions push upon the stack.

+ 0
- 2
bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java View File

import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.util.ByteSequence; import org.aspectj.apache.bcel.util.ByteSequence;


import com.sun.org.apache.bcel.internal.generic.SWITCH;

/** /**
* TABLESWITCH - Switch within given range of values, i.e., low..high * TABLESWITCH - Switch within given range of values, i.e., low..high
* *

+ 2
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ByteSequence.java View File

* information on the Apache Software Foundation, please see * information on the Apache Software Foundation, please see
* <http://www.apache.org/>. * <http://www.apache.org/>.
*/ */
import java.io.*;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;


/** /**
* Utility class that implements a sequence of bytes which can be read * Utility class that implements a sequence of bytes which can be read

+ 2
- 2
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/AnnotationAccessFlagTest.java View File



import java.io.File; import java.io.File;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.util.ClassPath; import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository; import org.aspectj.apache.bcel.util.SyntheticRepository;


import junit.framework.TestCase;

public class AnnotationAccessFlagTest extends TestCase { public class AnnotationAccessFlagTest extends TestCase {
private boolean verbose = false; private boolean verbose = false;

+ 1
- 1
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/AnnotationGenTest.java View File

import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.Utility; import org.aspectj.apache.bcel.classfile.Utility;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.RuntimeAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeAnnos;
import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisAnnos;
import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisAnnos;

+ 3
- 3
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/BcelTestCase.java View File

import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.classfile.Field;
import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method; import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue; import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue;
import org.aspectj.apache.bcel.generic.ObjectType; import org.aspectj.apache.bcel.generic.ObjectType;
import org.aspectj.apache.bcel.util.ClassPath; import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository; import org.aspectj.apache.bcel.util.SyntheticRepository;


import junit.framework.TestCase;

/** /**
* Super class for the Java5 tests, includes various helper methods. * Super class for the Java5 tests, includes various helper methods.
*/ */

+ 2
- 2
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/EnumAccessFlagTest.java View File



import java.io.File; import java.io.File;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.ConstantPool;
import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.util.ClassPath; import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository; import org.aspectj.apache.bcel.util.SyntheticRepository;


import junit.framework.TestCase;

public class EnumAccessFlagTest extends TestCase { public class EnumAccessFlagTest extends TestCase {
private boolean verbose = false; private boolean verbose = false;

+ 1
- 1
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GeneratingAnnotatedClassesTest.java View File

import org.aspectj.apache.bcel.classfile.annotation.AnnotationElementValue; import org.aspectj.apache.bcel.classfile.annotation.AnnotationElementValue;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue; import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue; import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue;
import org.aspectj.apache.bcel.generic.ArrayType; import org.aspectj.apache.bcel.generic.ArrayType;
import org.aspectj.apache.bcel.generic.ClassGen; import org.aspectj.apache.bcel.generic.ClassGen;

+ 2
- 2
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/NonCachingClassLoaderRepositoryTest.java View File

import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.util.NonCachingClassLoaderRepository; import org.aspectj.apache.bcel.util.NonCachingClassLoaderRepository;


import junit.framework.TestCase;

/** /**
* @author Kristian Rosenvold * @author Kristian Rosenvold
*/ */

+ 1
- 1
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java View File

import org.aspectj.apache.bcel.classfile.annotation.AnnotationElementValue; import org.aspectj.apache.bcel.classfile.annotation.AnnotationElementValue;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue; import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue; import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue;
import org.aspectj.apache.bcel.generic.ArrayType; import org.aspectj.apache.bcel.generic.ArrayType;
import org.aspectj.apache.bcel.generic.ClassGen; import org.aspectj.apache.bcel.generic.ClassGen;

+ 1
- 1
bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java View File

import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue; import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue;
import org.aspectj.apache.bcel.classfile.annotation.ClassElementValue; import org.aspectj.apache.bcel.classfile.annotation.ClassElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.apache.bcel.classfile.annotation.EnumElementValue; import org.aspectj.apache.bcel.classfile.annotation.EnumElementValue;
import org.aspectj.apache.bcel.classfile.annotation.NameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisAnnos;
import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue; import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue;
import org.aspectj.apache.bcel.generic.ClassGen; import org.aspectj.apache.bcel.generic.ClassGen;

+ 1
- 1
loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java View File

*******************************************************************************/ *******************************************************************************/
package org.aspectj.weaver.loadtime; package org.aspectj.weaver.loadtime;


import java.lang.instrument.Instrumentation;
import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.Instrumentation;


/** /**
* Java 1.5 preMain agent to hook in the class pre processor * Java 1.5 preMain agent to hook in the class pre processor

+ 2
- 2
loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java View File

*******************************************************************************/ *******************************************************************************/
package org.aspectj.weaver.loadtime; package org.aspectj.weaver.loadtime;


import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.AbortException; import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;


/** /**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>

+ 3
- 3
loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java View File

/** /**
* A class that hanldes LTW options. Note: AV - I choosed to not reuse AjCompilerOptions and alike since those implies too many * A class that hanldes LTW options. Note: AV - I choosed to not reuse AjCompilerOptions and alike since those implies too many
* dependancies on jdt and ajdt modules. * dependancies on jdt and ajdt modules.
*
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/ */
public class Options { public class Options {
if (arg.length() > OPTIONVALUED_messageHandler.length()) { if (arg.length() > OPTIONVALUED_messageHandler.length()) {
String handlerClass = arg.substring(OPTIONVALUED_messageHandler.length()).trim(); String handlerClass = arg.substring(OPTIONVALUED_messageHandler.length()).trim();
try { try {
Class handler = Class.forName(handlerClass, false, laoder);
Class<?> handler = Class.forName(handlerClass, false, laoder);
weaverOption.messageHandler = ((IMessageHandler) handler.newInstance()); weaverOption.messageHandler = ((IMessageHandler) handler.newInstance());
} catch (Throwable t) { } catch (Throwable t) {
weaverOption.messageHandler.handleMessage(new Message("Cannot instantiate message handler " + handlerClass, weaverOption.messageHandler.handleMessage(new Message("Cannot instantiate message handler " + handlerClass,


// configure the other options // configure the other options
for (Iterator<String> iterator = flags.iterator(); iterator.hasNext();) { for (Iterator<String> iterator = flags.iterator(); iterator.hasNext();) {
String arg = (String) iterator.next();
String arg = iterator.next();
if (arg.equals(OPTION_15)) { if (arg.equals(OPTION_15)) {
weaverOption.java5 = true; weaverOption.java5 = true;
} else if (arg.equalsIgnoreCase(OPTION_lazyTjp)) { } else if (arg.equalsIgnoreCase(OPTION_lazyTjp)) {

+ 2
- 2
loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java View File

import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.util.ClassPath; import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository; import org.aspectj.apache.bcel.util.SyntheticRepository;
import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.loadtime.definition.Definition;
import org.aspectj.weaver.tools.WeavingAdaptor; import org.aspectj.weaver.tools.WeavingAdaptor;


import junit.framework.TestCase;

public class ClassLoaderWeavingAdaptorTest extends TestCase { public class ClassLoaderWeavingAdaptorTest extends TestCase {


public void testClassLoaderWeavingAdaptor() { public void testClassLoaderWeavingAdaptor() {

+ 2
- 2
loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java View File

import org.aspectj.util.FileUtil; import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;


import junit.framework.TestCase;

import com.bea.jvm.ClassPreProcessor; import com.bea.jvm.ClassPreProcessor;
import com.bea.jvm.JVMFactory; import com.bea.jvm.JVMFactory;


import junit.framework.TestCase;

public class JRockitAgentTest extends TestCase { public class JRockitAgentTest extends TestCase {


protected void setUp() throws Exception { protected void setUp() throws Exception {

+ 2
- 2
loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java View File

import java.util.Enumeration; import java.util.Enumeration;
import java.util.List; import java.util.List;


import junit.framework.TestCase;

import org.aspectj.weaver.tools.WeavingAdaptor; import org.aspectj.weaver.tools.WeavingAdaptor;


import junit.framework.TestCase;

public class WeavingContextTest extends TestCase { public class WeavingContextTest extends TestCase {


private boolean called; private boolean called;

+ 2
- 4
loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java View File

import java.io.File; import java.io.File;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Properties; import java.util.Properties;


import junit.framework.TestCase;

import org.aspectj.bridge.AbortException; import org.aspectj.bridge.AbortException;
import org.aspectj.testing.util.TestUtil;
import org.aspectj.testing.util.TestUtil.TestError; import org.aspectj.testing.util.TestUtil.TestError;
import org.aspectj.util.FileUtil; import org.aspectj.util.FileUtil;
import org.aspectj.weaver.tools.WeavingAdaptor; import org.aspectj.weaver.tools.WeavingAdaptor;


import junit.framework.TestCase;

/** /**
* @author websterm * @author websterm
* *

+ 2
- 2
loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java View File

*******************************************************************************/ *******************************************************************************/
package org.aspectj.weaver.loadtime.test; package org.aspectj.weaver.loadtime.test;


import junit.framework.TestCase;

import java.net.URL; import java.net.URL;


import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.loadtime.definition.Definition;
import org.aspectj.weaver.loadtime.definition.DocumentParser; import org.aspectj.weaver.loadtime.definition.DocumentParser;


import junit.framework.TestCase;

/** /**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/ */

+ 222
- 211
testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
File diff suppressed because it is too large
View File


+ 1
- 1
util/src/main/java/org/aspectj/util/Reflection.java View File

package org.aspectj.util; package org.aspectj.util;


import java.io.File; import java.io.File;
import java.lang.reflect.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;

+ 6
- 2
util/src/main/java/org/aspectj/util/SoftHashMap.java View File

* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* ******************************************************************/package org.aspectj.util; * ******************************************************************/package org.aspectj.util;


import java.lang.ref.*;
import java.util.*;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;


public class SoftHashMap<K,V> extends AbstractMap<K,V> { public class SoftHashMap<K,V> extends AbstractMap<K,V> {
private Map<K, SpecialValue> map; private Map<K, SpecialValue> map;

+ 2
- 1
util/src/test/java/org/aspectj/util/UtilModuleTests.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.util; package org.aspectj.util;


import junit.framework.*;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;


public class UtilModuleTests extends TestCase { public class UtilModuleTests extends TestCase {



+ 0
- 2
weaver/src/main/java/org/aspectj/weaver/bcel/BcelRenderer.java View File



package org.aspectj.weaver.bcel; package org.aspectj.weaver.bcel;


import java.lang.reflect.Modifier;

import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionFactory;
import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionHandle;

+ 0
- 1
weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java View File

import org.aspectj.util.FuzzyBoolean; import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.Advice; import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind; import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationAJ;
import org.aspectj.weaver.AnnotationOnTypeMunger; import org.aspectj.weaver.AnnotationOnTypeMunger;
import org.aspectj.weaver.BCException; import org.aspectj.weaver.BCException;

+ 0
- 1
weaver/src/main/java/org/aspectj/weaver/loadtime/definition/DocumentParser.java View File



import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.loadtime.definition.Definition.AdviceKind; import org.aspectj.weaver.loadtime.definition.Definition.AdviceKind;
import org.aspectj.weaver.loadtime.definition.Definition.DeclareAnnotation;
import org.aspectj.weaver.loadtime.definition.Definition.DeclareAnnotationKind; import org.aspectj.weaver.loadtime.definition.Definition.DeclareAnnotationKind;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;

+ 0
- 1
weaver/src/main/java/org/aspectj/weaver/loadtime/definition/SimpleAOPParser.java View File

import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map; import java.util.Map;
import java.util.Set;


import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.loadtime.definition.Definition.AdviceKind; import org.aspectj.weaver.loadtime.definition.Definition.AdviceKind;

+ 3
- 3
weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java View File



package org.aspectj.weaver.tools.cache; package org.aspectj.weaver.tools.cache;


import java.util.LinkedList;
import java.util.List;

import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.Message; import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.MessageUtil;
import org.aspectj.weaver.tools.GeneratedClassHandler; import org.aspectj.weaver.tools.GeneratedClassHandler;


import java.util.LinkedList;
import java.util.List;

/** /**
* Manages a cache of weaved and generated classes similar to Eclipse Equinox, * Manages a cache of weaved and generated classes similar to Eclipse Equinox,
* except designed to operate across multiple restarts of the JVM and with one * except designed to operate across multiple restarts of the JVM and with one

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/AbstractTraceTest.java View File



import java.util.ArrayList; import java.util.ArrayList;


import junit.framework.TestCase;

import org.aspectj.weaver.tools.AbstractTrace; import org.aspectj.weaver.tools.AbstractTrace;
import org.aspectj.weaver.tools.DefaultTrace; import org.aspectj.weaver.tools.DefaultTrace;
import org.aspectj.weaver.tools.Traceable; import org.aspectj.weaver.tools.Traceable;


import junit.framework.TestCase;

public abstract class AbstractTraceTest extends TestCase { public abstract class AbstractTraceTest extends TestCase {


protected AbstractTrace trace; protected AbstractTrace trace;

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/BoundedReferenceTypeTestCase.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

public class BoundedReferenceTypeTestCase extends TestCase { public class BoundedReferenceTypeTestCase extends TestCase {


ReferenceType javaLangClass; ReferenceType javaLangClass;

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/CommonsTraceFactoryTest.java View File

*******************************************************************************/ *******************************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.weaver.tools.CommonsTraceFactory; import org.aspectj.weaver.tools.CommonsTraceFactory;
import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.Trace;


import junit.framework.TestCase;

public class CommonsTraceFactoryTest extends TestCase { public class CommonsTraceFactoryTest extends TestCase {


public void testGetTraceFactory() { public void testGetTraceFactory() {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/DumpTestCase.java View File

import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;


import junit.framework.TestCase;

import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHolder; import org.aspectj.bridge.IMessageHolder;
import org.aspectj.bridge.Message; import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageHandler; import org.aspectj.bridge.MessageHandler;


import junit.framework.TestCase;

/** /**
* @author websterm * @author websterm
* *

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/GenericSignatureParserTest.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method; import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.util.SyntheticRepository; import org.aspectj.apache.bcel.util.SyntheticRepository;
import org.aspectj.util.GenericSignatureParser; import org.aspectj.util.GenericSignatureParser;


import junit.framework.TestCase;

/** /**
* @author Adrian Colyer * @author Adrian Colyer
* @author Andy Clement * @author Andy Clement

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/Jdk14TraceFactoryTest.java View File

*******************************************************************************/ *******************************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.weaver.tools.Jdk14TraceFactory; import org.aspectj.weaver.tools.Jdk14TraceFactory;
import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.Trace;


import junit.framework.TestCase;

public class Jdk14TraceFactoryTest extends TestCase { public class Jdk14TraceFactoryTest extends TestCase {


public void testJdk14TraceFactory() { public void testJdk14TraceFactory() {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java View File

import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;


import junit.framework.TestCase;

import org.aspectj.weaver.reflect.ReflectionWorld; import org.aspectj.weaver.reflect.ReflectionWorld;


import junit.framework.TestCase;

/** /**
* @author Andy Clement * @author Andy Clement
*/ */

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/LocaleTest.java View File

import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.generic.Instruction; import org.aspectj.apache.bcel.generic.Instruction;
import org.aspectj.apache.bcel.util.ByteSequence; import org.aspectj.apache.bcel.util.ByteSequence;


import junit.framework.TestCase;

public class LocaleTest extends TestCase { public class LocaleTest extends TestCase {


public LocaleTest(String name) { public LocaleTest(String name) {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/MemberTestCase.java View File



import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;


import junit.framework.TestCase;

import org.aspectj.testing.util.TestUtil; import org.aspectj.testing.util.TestUtil;


import junit.framework.TestCase;

/** /**
* This is a test case for all the portions of Member that don't require a world. * This is a test case for all the portions of Member that don't require a world.
*/ */

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/ReferenceTypeTestCase.java View File

import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;


import junit.framework.TestCase;

import org.aspectj.util.PartialOrder; import org.aspectj.util.PartialOrder;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

// test cases for Adrian's additions to ReferenceType // test cases for Adrian's additions to ReferenceType
// XXX - couldn't find any unit test cases for the rest of the ReferenceType class // XXX - couldn't find any unit test cases for the rest of the ReferenceType class
public class ReferenceTypeTestCase extends TestCase { public class ReferenceTypeTestCase extends TestCase {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

/** /**
* @author colyer * @author colyer
* *

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/TypeVariableTestCase.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

public class TypeVariableTestCase extends TestCase { public class TypeVariableTestCase extends TestCase {


private UnresolvedType javaLangNumber; private UnresolvedType javaLangNumber;

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/TypeXTestCase.java View File



package org.aspectj.weaver; package org.aspectj.weaver;


import junit.framework.TestCase;

import org.aspectj.testing.util.TestUtil; import org.aspectj.testing.util.TestUtil;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

/** /**
* This is a test case for all the portions of UnresolvedType that don't require a world. * This is a test case for all the portions of UnresolvedType that don't require a world.
*/ */

+ 52
- 6
weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java View File



import org.aspectj.matcher.tools.ReflectionWorldAdvancedPointcutExpressionTest; import org.aspectj.matcher.tools.ReflectionWorldAdvancedPointcutExpressionTest;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.bcel.*;
import org.aspectj.weaver.patterns.*;
import org.aspectj.weaver.patterns.bcel.*;
import org.aspectj.weaver.reflect.*;
import org.aspectj.weaver.tools.*;
import org.aspectj.weaver.tools.cache.*;
import org.aspectj.weaver.bcel.AfterReturningWeaveTestCase;
import org.aspectj.weaver.bcel.AfterThrowingWeaveTestCase;
import org.aspectj.weaver.bcel.AfterWeaveTestCase;
import org.aspectj.weaver.bcel.ArgsWeaveTestCase;
import org.aspectj.weaver.bcel.AroundArgsWeaveTestCase;
import org.aspectj.weaver.bcel.AroundWeaveTestCase;
import org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXTestCase;
import org.aspectj.weaver.bcel.BcelWorldReferenceTypeTest;
import org.aspectj.weaver.bcel.BeforeWeaveTestCase;
import org.aspectj.weaver.bcel.CheckerTestCase;
import org.aspectj.weaver.bcel.ClassLoaderRepositoryTest;
import org.aspectj.weaver.bcel.FieldSetTestCase;
import org.aspectj.weaver.bcel.HierarchyDependsTestCase;
import org.aspectj.weaver.bcel.IdWeaveTestCase;
import org.aspectj.weaver.bcel.JImageTestCase;
import org.aspectj.weaver.bcel.MegaZipTestCase;
import org.aspectj.weaver.bcel.MoveInstructionsWeaveTestCase;
import org.aspectj.weaver.bcel.NonstaticWeaveTestCase;
import org.aspectj.weaver.bcel.PatternWeaveTestCase;
import org.aspectj.weaver.bcel.PointcutResidueTestCase;
import org.aspectj.weaver.bcel.TjpWeaveTestCase;
import org.aspectj.weaver.bcel.TraceJarWeaveTestCase;
import org.aspectj.weaver.bcel.UtilityTestCase;
import org.aspectj.weaver.bcel.WeaveOrderTestCase;
import org.aspectj.weaver.bcel.WorldTestCase;
import org.aspectj.weaver.bcel.ZipTestCase;
import org.aspectj.weaver.patterns.AnnotationPatternMatchingTestCase;
import org.aspectj.weaver.patterns.AnnotationPatternTestCase;
import org.aspectj.weaver.patterns.ConcretizationTestCase;
import org.aspectj.weaver.patterns.WildTypePatternResolutionTestCase;
import org.aspectj.weaver.patterns.bcel.BcelAndOrNotTestCase;
import org.aspectj.weaver.patterns.bcel.BcelBindingTestCase;
import org.aspectj.weaver.patterns.bcel.BcelModifiersPatternTestCase;
import org.aspectj.weaver.patterns.bcel.BcelParserTestCase;
import org.aspectj.weaver.patterns.bcel.BcelSignaturePatternTestCase;
import org.aspectj.weaver.patterns.bcel.BcelTypePatternListTestCase;
import org.aspectj.weaver.patterns.bcel.BcelTypePatternTestCase;
import org.aspectj.weaver.patterns.bcel.BcelWithinTestCase;
import org.aspectj.weaver.reflect.ReflectionWorldReferenceTypeTest;
import org.aspectj.weaver.reflect.ReflectionWorldTest;
import org.aspectj.weaver.tools.Java15PointcutExpressionTest;
import org.aspectj.weaver.tools.PointcutDesignatorHandlerTest;
import org.aspectj.weaver.tools.PointcutExpressionTest;
import org.aspectj.weaver.tools.PointcutParserTest;
import org.aspectj.weaver.tools.ReadingAttributesTest;
import org.aspectj.weaver.tools.TypePatternMatcherTest;
import org.aspectj.weaver.tools.cache.DefaultCacheKeyResolverTest;
import org.aspectj.weaver.tools.cache.DefaultFileCacheBackingTest;
import org.aspectj.weaver.tools.cache.FlatFileCacheBackingTest;
import org.aspectj.weaver.tools.cache.SimpleClassCacheTest;
import org.aspectj.weaver.tools.cache.WeavedClassCacheTest;
import org.aspectj.weaver.tools.cache.ZippedFileCacheBackingTest;


import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;

+ 2
- 4
weaver/src/test/java/org/aspectj/weaver/WeaverTestCase.java View File



import java.io.File; import java.io.File;


import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.aspectj.util.FileUtil; import org.aspectj.util.FileUtil;


import junit.framework.TestCase;

public abstract class WeaverTestCase extends TestCase { public abstract class WeaverTestCase extends TestCase {


public static final String TESTDATA_PATH = "../weaver/testdata"; public static final String TESTDATA_PATH = "../weaver/testdata";

+ 1
- 1
weaver/src/test/java/org/aspectj/weaver/bcel/AfterWeaveTestCase.java View File



package org.aspectj.weaver.bcel; package org.aspectj.weaver.bcel;


import java.io.*;
import java.io.IOException;


public class AfterWeaveTestCase extends WeaveTestCase { public class AfterWeaveTestCase extends WeaveTestCase {
{ {

+ 3
- 3
weaver/src/test/java/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver.bcel; package org.aspectj.weaver.bcel;


import junit.framework.TestCase;

import java.util.Arrays; import java.util.Arrays;


import org.aspectj.apache.bcel.Repository; import org.aspectj.apache.bcel.Repository;
import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Signature; import org.aspectj.apache.bcel.classfile.Signature;
import org.aspectj.util.GenericSignature; import org.aspectj.util.GenericSignature;
import org.aspectj.util.GenericSignature.ClassSignature;
import org.aspectj.util.GenericSignatureParser; import org.aspectj.util.GenericSignatureParser;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.util.GenericSignature.ClassSignature;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;


import junit.framework.TestCase;

/** /**
* @author colyer * @author colyer
* *

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/bcel/CheckerTestCase.java View File



import java.io.IOException; import java.io.IOException;


import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.MessageHandler;
import org.aspectj.weaver.Checker; import org.aspectj.weaver.Checker;
import org.aspectj.weaver.patterns.DeclareErrorOrWarning; import org.aspectj.weaver.patterns.DeclareErrorOrWarning;
import org.aspectj.bridge.*;
import org.aspectj.bridge.MessageHandler;


public class CheckerTestCase extends WeaveTestCase { public class CheckerTestCase extends WeaveTestCase {
{ {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/bcel/ClassLoaderRepositoryTest.java View File

import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.util.ClassLoaderRepository; import org.aspectj.apache.bcel.util.ClassLoaderRepository;


import junit.framework.TestCase;

/** NOT YET INCLUDED IN A FULL TEST RUN - WORK IN PROGRESS CHECKING CLASSLOADERREPOSITORY OPTIMIZATIONS */ /** NOT YET INCLUDED IN A FULL TEST RUN - WORK IN PROGRESS CHECKING CLASSLOADERREPOSITORY OPTIMIZATIONS */
public class ClassLoaderRepositoryTest extends TestCase { public class ClassLoaderRepositoryTest extends TestCase {
private File f; private File f;

+ 1
- 1
weaver/src/test/java/org/aspectj/weaver/bcel/MegaZipTestCase.java View File

import java.util.List; import java.util.List;


import org.aspectj.weaver.AdviceKind; import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.Member; import org.aspectj.weaver.Member;
import org.aspectj.weaver.MemberImpl; import org.aspectj.weaver.MemberImpl;
import org.aspectj.weaver.Shadow; import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.ShadowMunger; import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.WeaverTestCase;


public class MegaZipTestCase extends WeaveTestCase { public class MegaZipTestCase extends WeaveTestCase {



+ 7
- 2
weaver/src/test/java/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java View File



import java.io.IOException; import java.io.IOException;


import org.aspectj.weaver.*;
import org.aspectj.weaver.patterns.*;
import org.aspectj.weaver.CrosscuttingMembers;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.patterns.PatternParser;
import org.aspectj.weaver.patterns.PerClause;
import org.aspectj.weaver.patterns.PerSingleton;
import org.aspectj.weaver.patterns.TestScope;


public class NonstaticWeaveTestCase extends WeaveTestCase { public class NonstaticWeaveTestCase extends WeaveTestCase {
{ {

+ 1
- 1
weaver/src/test/java/org/aspectj/weaver/bcel/UtilityTestCase.java View File





package org.aspectj.weaver.bcel; package org.aspectj.weaver.bcel;
import java.io.*;
import java.io.IOException;


import junit.framework.TestCase; import junit.framework.TestCase;



+ 8
- 2
weaver/src/test/java/org/aspectj/weaver/bcel/WeaveOrderTestCase.java View File



package org.aspectj.weaver.bcel; package org.aspectj.weaver.bcel;


import org.aspectj.weaver.patterns.*;
import org.aspectj.weaver.*;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.CrosscuttingMembers;
import org.aspectj.weaver.MemberImpl;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.patterns.Declare;
import org.aspectj.weaver.patterns.PatternParser;


/**. /**.
*/ */

+ 1
- 1
weaver/src/test/java/org/aspectj/weaver/bcel/WorldTestCase.java View File

import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;


import org.aspectj.weaver.Advice; import org.aspectj.weaver.Advice;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.CommonWorldTests; import org.aspectj.weaver.CommonWorldTests;
import org.aspectj.weaver.Member; import org.aspectj.weaver.Member;
import org.aspectj.weaver.MemberImpl; import org.aspectj.weaver.MemberImpl;
import org.aspectj.weaver.ShadowMunger; import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.TestUtils; import org.aspectj.weaver.TestUtils;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.World; import org.aspectj.weaver.World;


/** /**

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/bcel/ZipTestCase.java View File

import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;


import junit.framework.TestCase;

import org.aspectj.weaver.WeaverTestCase; import org.aspectj.weaver.WeaverTestCase;


import junit.framework.TestCase;

public class ZipTestCase extends TestCase { public class ZipTestCase extends TestCase {


File outDir; File outDir;

+ 3
- 3
weaver/src/test/java/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java View File

import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;


import junit.framework.TestCase;

import org.aspectj.bridge.AbortException; import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessage.Kind; import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IMessageHandler;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

/* /*
* Sample types that this program uses are: * Sample types that this program uses are:



+ 3
- 3
weaver/src/test/java/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver.patterns; package org.aspectj.weaver.patterns;


import junit.framework.TestCase;

import org.aspectj.bridge.AbortException; import org.aspectj.bridge.AbortException;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.AnnotatedElement; import org.aspectj.weaver.AnnotatedElement;
import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationAJ;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.WeaverTestCase;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

public class AnnotationPatternTestCase extends TestCase { public class AnnotationPatternTestCase extends TestCase {


public void testParseSimpleAnnotationPattern() { public void testParseSimpleAnnotationPattern() {

+ 3
- 3
weaver/src/test/java/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java View File

import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;


import junit.framework.TestCase;

import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
import org.aspectj.weaver.BoundedReferenceType; import org.aspectj.weaver.BoundedReferenceType;
import org.aspectj.weaver.CompressingDataOutputStream; import org.aspectj.weaver.CompressingDataOutputStream;
import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.VersionedDataInputStream; import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.World; import org.aspectj.weaver.World;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

// TODO write test cases for instanceof matching // TODO write test cases for instanceof matching


public class WildTypePatternResolutionTestCase extends TestCase { public class WildTypePatternResolutionTestCase extends TestCase {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java View File

import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;


import junit.framework.TestCase;

import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.BcelWorld;


import junit.framework.TestCase;

public abstract class ReflectionBasedReferenceTypeDelegateTest extends TestCase { public abstract class ReflectionBasedReferenceTypeDelegateTest extends TestCase {


protected ReflectionWorld world; protected ReflectionWorld world;

+ 2
- 3
weaver/src/test/java/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java View File

import org.aspectj.weaver.patterns.TypePatternList; import org.aspectj.weaver.patterns.TypePatternList;
import org.aspectj.weaver.patterns.WildAnnotationTypePattern; import org.aspectj.weaver.patterns.WildAnnotationTypePattern;


import test.A1AnnotatedType;
import test.A2AnnotatedType;

import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import test.A1AnnotatedType;
import test.A2AnnotatedType;


/** /**
* Test parameter pointcut parsing. Extended by Andy Clement to cover parameter annotation matching. * Test parameter pointcut parsing. Extended by Andy Clement to cover parameter annotation matching.

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/tools/PointcutDesignatorHandlerTest.java View File

* ******************************************************************/ * ******************************************************************/
package org.aspectj.weaver.tools; package org.aspectj.weaver.tools;


import junit.framework.TestCase;

import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;


import junit.framework.TestCase;

/** /**
* @author Adrian Colyer * @author Adrian Colyer
* *

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/tools/PointcutExpressionTest.java View File

import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;


import junit.framework.TestCase;

import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;


import junit.framework.TestCase;

public class PointcutExpressionTest extends TestCase { public class PointcutExpressionTest extends TestCase {


PointcutParser p; PointcutParser p;

+ 3
- 3
weaver/src/test/java/org/aspectj/weaver/tools/PointcutParserTest.java View File

import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;


import junit.framework.Assert;
import junit.framework.TestCase;

import org.aspectj.bridge.AbortException; import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessage.Kind; import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.Pointcut;
import org.aspectj.weaver.patterns.PointcutRewriter; import org.aspectj.weaver.patterns.PointcutRewriter;


import junit.framework.Assert;
import junit.framework.TestCase;

/** /**
* Test cases for the PointcutParser class * Test cases for the PointcutParser class
*/ */

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/tools/ReadingAttributesTest.java View File

import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;


import junit.framework.TestCase;

import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Unknown; import org.aspectj.apache.bcel.classfile.Unknown;
import org.aspectj.weaver.VersionedDataInputStream; import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.WeaverStateInfo;


import junit.framework.TestCase;

public class ReadingAttributesTest extends TestCase { public class ReadingAttributesTest extends TestCase {


public void testSkip() {} // Review what to do about these tests public void testSkip() {} // Review what to do about these tests

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java View File

import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;


import junit.framework.TestCase;

import org.aspectj.util.FileUtil; import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil; import org.aspectj.util.LangUtil;
import org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking.IndexEntry; import org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking.IndexEntry;


import junit.framework.TestCase;

/** /**
*/ */
public abstract class AbstractCacheBackingTestSupport extends TestCase { public abstract class AbstractCacheBackingTestSupport extends TestCase {

+ 2
- 2
weaver/src/test/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolverTest.java View File



package org.aspectj.weaver.tools.cache; package org.aspectj.weaver.tools.cache;


import junit.framework.TestCase;

import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;


import junit.framework.TestCase;

/** /**
*/ */
public class DefaultCacheKeyResolverTest extends TestCase { public class DefaultCacheKeyResolverTest extends TestCase {

+ 2
- 1
weaver/src/test/java/test/A3.java View File

* ******************************************************************/ * ******************************************************************/
package test; package test;


import java.lang.annotation.*;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface A3 { public @interface A3 {

Loading…
Cancel
Save