You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ICompilerConfiguration.java 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /********************************************************************
  2. * Copyright (c) 2007 Contributors. All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v 2.0
  5. * which accompanies this distribution and is available at
  6. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  7. *
  8. * Contributors: IBM Corporation - initial API and implementation
  9. * Helen Hawkins - initial version (bug 148190)
  10. *******************************************************************/
  11. package org.aspectj.ajde.core;
  12. import java.io.File;
  13. import java.util.List;
  14. import java.util.Map;
  15. import java.util.Set;
  16. import org.aspectj.ajdt.internal.core.builder.CompilerConfigurationChangeFlags;
  17. /**
  18. * Interface that contains all the configuration required for the compiler to be able to perform a build
  19. */
  20. public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags {
  21. /**
  22. * Returns the table of the current custom java options.
  23. * <p>
  24. * For a complete description of the configurable options, see {@link org.aspectj.ajde.core.JavaOptions#getDefaultJavaOptions}
  25. * or {@link org.aspectj.org.eclipse.jdt.core.IJavaProject#getOptions(boolean)}
  26. * </p>
  27. *
  28. * @return table of current settings of all options (key type: <code>String</code>; value type: <code>String</code>)
  29. * @see org.aspectj.ajde.core.JavaOptions#getDefaultJavaOptions or
  30. * org.aspectj.org.eclipse.jdt.core.IJavaProject#getOptions(boolean)
  31. */
  32. Map<String,String> getJavaOptionsMap();
  33. /**
  34. * The non-standard options, typically prefaced with -X when used with a command line compiler. The default is no non-standard
  35. * options. Options should be separated by a space, for example "-showWeaveInfo -XnoInline"
  36. */
  37. String getNonStandardOptions();
  38. /**
  39. * @return a list of those files to include in the build
  40. */
  41. List<String> getProjectSourceFiles();
  42. /**
  43. * @return a list of those files that should be used to configure a build
  44. */
  45. List<String> getProjectXmlConfigFiles();
  46. /**
  47. * Return a subset of those files we'd get on getProjectSourceFiles() - the subset that have changed since the last build. If
  48. * someone else has already worked out what needs rebuilding, we don't need to do it again by checking all of the
  49. * projectSourceFiles(). Returning an empty list means nothing has changed, returning null means you have no idea what changed
  50. * and the compiler should work it out.
  51. *
  52. * @return a subset of those files that would be returned on getProjectSourceFiles() that have actually *changed*
  53. */
  54. List<File> getProjectSourceFilesChanged();
  55. String getClasspath();
  56. String getModulepath();
  57. String getModuleSourcepath();
  58. /**
  59. * @return the IOutputLocationManager associated with this compiler configuration
  60. */
  61. IOutputLocationManager getOutputLocationManager();
  62. /**
  63. * @return the set of input path elements for this compilation. Set members should be of the type java.io.File. An empty set or
  64. * null is acceptable for this option. From -inpath
  65. */
  66. Set<File> getInpath();
  67. /**
  68. * @return the output jar file for the compilation results. Return null to leave classfiles unjar'd in output directory From
  69. * -outjar
  70. */
  71. String getOutJar();
  72. /**
  73. * @return the set of aspect jar files to be used for the compilation. Returning null or an empty set disables this option. Set
  74. * members should be of type java.io.File. From -aspectpath
  75. */
  76. Set<File> getAspectPath();
  77. /**
  78. * Get the set of non-Java resources for this compilation. Set members should be of type java.io.File. An empty set or null is
  79. * acceptable for this option.
  80. *
  81. * @return map from unique resource name to absolute path to source resource (String to File)
  82. */
  83. Map<String,File> getSourcePathResources();
  84. /**
  85. * Returns a set of bit flags indicating what has changed in the configuration since it was previously read. This allows the
  86. * compiler to avoid repeating computation for values that are the same as before.
  87. *
  88. * @return set of bit flags, see the constants in @link {@link CompilerConfigurationChangeFlags}. If unsure return EVERYTHING
  89. */
  90. int getConfigurationChanges();
  91. /**
  92. * Called by AspectJ once it has processed the configuration object and is ready to do a build. The configuration object may or
  93. * may not be interested in this event. It probably will be if it is correctly tracking changes and answering
  94. * getConfigurationChanges() with something other than EVERYTHING.
  95. */
  96. void configurationRead();
  97. /**
  98. * Return a List (Strings) of the directory elements on the classpath that are likely to contain modified .class files since the
  99. * previous build and must be checked. This would be used in the situation where a project has a dependency on another project
  100. * and the dependency is captured by inclusion of one project on the classpath for the other. When the first project is built,
  101. * we need to check the classpath element on the second projects classpath that represents the bin folder of the first project.
  102. * By explicitly returning a list here we can avoid checking EVERYTHING.
  103. *
  104. * @return a list of modified elements that should be checked (can be empty) or null if unknown (and in which case every
  105. * classpath element will be checked)
  106. */
  107. List<String> getClasspathElementsWithModifiedContents();
  108. //
  109. // /**
  110. // * @return the location where the state can be persisted across eclipse restarts. eg. f:/foo/bar/goo
  111. // */
  112. // public String getLocationForPersistingProjectState();
  113. /**
  114. * Return the encoding to use for this project. Return null if the platform default should be used. Example return value "UTF-8"
  115. */
  116. String getProjectEncoding();
  117. /**
  118. * @return the list of processor classes to execute
  119. */
  120. String getProcessor();
  121. /**
  122. * @return the processor path where the specified processor(s) can be found
  123. */
  124. String getProcessorPath();
  125. }