@Override
    @SuppressWarnings("unchecked")
    public void visitAnnotations(AnnotatedNode node) {
      for (AnnotationNode an : node.getAnnotations()) {
        ClassNode cn = an.getClassNode();

        // this comparison should be good enough, and also works in phase conversion
        if (cn.getNameWithoutPackage().equals(Inspect.class.getSimpleName())) {
          ConstantExpression name = (ConstantExpression)an.getMember("value");
          if (name == null || !(name.getValue() instanceof String))
            throw new AstInspectorException("@Inspect must have a String argument");
          addNode(markedNodes, (String)name.getValue(), node);
          break;
        }
      }

      super.visitAnnotations(node);
    }
Returns the first expression found that is
either immediately preceded by a label with the specified name, or is the
single argument in a method call of the form "inspect_name(expression)".

<p>Example:
<pre>
def inspector = new AstInspector()
inspector.load("fooBar: foo.bar(inspect_firstArg(a), b)")
def fooBar = inspector.getExpression("fooBar")
def firstArg = inspector.getExpression("firstArg")
</pre>

@param name the name of a label immediately preceding the expression of
interest, or NAME in a method call "inspect_NAME" wrapping the expression
of interest
@return the Expression representing the first matching expression
spock-core/src/main/java/org/spockframework/util/inspector/AstInspector.java