Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

OutputLocationAdapter.java 2.4KB

17 роки тому
15 роки тому
17 роки тому
15 роки тому
17 роки тому
15 роки тому
17 роки тому
15 роки тому
17 роки тому
15 роки тому
17 роки тому
9 роки тому
17 роки тому
15 роки тому
15 роки тому
15 роки тому
9 роки тому
15 роки тому
17 роки тому
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /********************************************************************
  2. * Copyright (c) 2006 Contributors.All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution and is available at
  6. * http://eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * Adrian Colyer Initial implementation
  10. * Helen Hawkins converted to new interface (bug 148190)
  11. *
  12. *******************************************************************/
  13. package org.aspectj.ajde.core.internal;
  14. import java.io.File;
  15. import java.util.List;
  16. import java.util.Map;
  17. import org.aspectj.ajde.core.IOutputLocationManager;
  18. import org.aspectj.ajdt.internal.compiler.CompilationResultDestinationManager;
  19. /**
  20. * Enables the output locations detailed by the IOutputLocationManager implementation to be related to the comipler/weaver.
  21. */
  22. public class OutputLocationAdapter implements CompilationResultDestinationManager {
  23. private IOutputLocationManager locationManager;
  24. public OutputLocationAdapter(IOutputLocationManager mgr) {
  25. this.locationManager = mgr;
  26. }
  27. public File getOutputLocationForClass(File compilationUnit) {
  28. return this.locationManager.getOutputLocationForClass(compilationUnit);
  29. }
  30. public String getSourceFolderForFile(File sourceFile) {
  31. return this.locationManager.getSourceFolderForFile(sourceFile);
  32. }
  33. public File getOutputLocationForResource(File resource) {
  34. return this.locationManager.getOutputLocationForResource(resource);
  35. }
  36. public List<File> getAllOutputLocations() {
  37. return this.locationManager.getAllOutputLocations();
  38. }
  39. public File getDefaultOutputLocation() {
  40. return this.locationManager.getDefaultOutputLocation();
  41. }
  42. public void reportFileWrite(String outputfile, int filetype) {
  43. this.locationManager.reportFileWrite(outputfile, filetype);
  44. }
  45. public void reportFileRemove(String outputfile, int filetype) {
  46. this.locationManager.reportFileRemove(outputfile, filetype);
  47. }
  48. public int discoverChangesSince(File dir, long buildtime) {
  49. return this.locationManager.discoverChangesSince(dir,buildtime);
  50. }
  51. /**
  52. * Return a map from fully qualified jar/dir entries to handle components.
  53. *
  54. * @return a map from inpath entries (jars/dirs) to handle components.
  55. */
  56. public Map<File,String> getInpathMap() {
  57. return this.locationManager.getInpathMap();
  58. }
  59. }