Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

IWeavingContext.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*******************************************************************************
  2. * Copyright (c) 2005 Contributors.
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * David Knibb initial implementation
  11. *******************************************************************************/
  12. package org.aspectj.weaver.loadtime;
  13. import java.io.IOException;
  14. import java.net.URL;
  15. import java.util.Enumeration;
  16. /**
  17. * This class adds support to AspectJ for an OSGi environment
  18. *
  19. * @author David Knibb
  20. */
  21. public interface IWeavingContext {
  22. /**
  23. * Allows the standard ClassLoader.getResources() mechanisms to be
  24. * replaced with a different implementation.
  25. * In an OSGi environment, this will allow for filtering to take
  26. * place on the results of ClassLoader.getResources(). In a non-OSGi
  27. * environment, ClassLoader.getResources should be returned.
  28. * @param name the name of the resource to search for
  29. * @return an enumeration containing all of the matching resources found
  30. * @throws IOException
  31. */
  32. public Enumeration getResources(String name) throws IOException;
  33. /**
  34. * In an OSGi environment, determin which bundle a URL originated from.
  35. * In a non-OSGi environment, implementors should return <code>null<code>.
  36. * @param url
  37. * @return
  38. */
  39. public String getBundleIdFromURL(URL url);
  40. /**
  41. * In an environment with multiple class loaders allows each to be
  42. * identified using something safer and than toString
  43. * @return name of the associated class loader
  44. */
  45. public String getClassLoaderName ();
  46. }