Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

FastMatchInfo.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* *******************************************************************
  2. * Copyright (c) 2004 Contributors
  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. * Jim Hugunin initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.patterns;
  13. import org.aspectj.weaver.ResolvedType;
  14. import org.aspectj.weaver.Shadow;
  15. import org.aspectj.weaver.World;
  16. import org.aspectj.weaver.Shadow.Kind;
  17. /**
  18. * Represents a type that pointcuts may match. Fast match for a pointcut should quickly say NO if it can.
  19. */
  20. public class FastMatchInfo {
  21. private Kind kind;
  22. private ResolvedType type;
  23. public World world;
  24. public FastMatchInfo(ResolvedType type, Shadow.Kind kind, World world) {
  25. this.type = type;
  26. this.kind = kind;
  27. this.world = world;
  28. }
  29. /**
  30. * kind can be null to indicate that all kinds should be considered. This is usually done as a first pass
  31. *
  32. * @return
  33. */
  34. public Kind getKind() {
  35. return kind;
  36. }
  37. public ResolvedType getType() {
  38. return type;
  39. }
  40. @Override
  41. public String toString() {
  42. return "FastMatchInfo [type=" + type.getName() + "] [" + (kind == null ? "AllKinds" : "Kind=" + kind) + "]";
  43. }
  44. }