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.

IScope.java 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. *
  9. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.patterns;
  13. import org.aspectj.bridge.IMessage;
  14. import org.aspectj.bridge.IMessageHandler;
  15. import org.aspectj.weaver.IHasPosition;
  16. import org.aspectj.weaver.ResolvedType;
  17. import org.aspectj.weaver.UnresolvedType;
  18. import org.aspectj.weaver.World;
  19. public interface IScope {
  20. /**
  21. * @return the type corresponding to the name in this scope, or ResolvedType.MISSING if no such type exists
  22. */
  23. UnresolvedType lookupType(String name, IHasPosition location);
  24. World getWorld();
  25. ResolvedType getEnclosingType();
  26. // these next three are used to create {@link BindingTypePattern} objects.
  27. IMessageHandler getMessageHandler();
  28. /**
  29. * @return the formal associated with the name, or null if no such formal exists
  30. */
  31. FormalBinding lookupFormal(String name);
  32. /**
  33. * @return the formal with the index. Throws ArrayOutOfBounds exception if out of bounds
  34. */
  35. FormalBinding getFormal(int i);
  36. int getFormalCount();
  37. String[] getImportedPrefixes();
  38. String[] getImportedNames();
  39. void message(IMessage.Kind kind, IHasPosition location, String message);
  40. void message(IMessage.Kind kind, IHasPosition location1, IHasPosition location2, String message);
  41. void message(IMessage aMessage);
  42. // ISourceLocation makeSourceLocation(ILocation location);
  43. }