code: private ClassNode getGenericsResolvedTypeOfFieldOrProperty(AnnotatedNode an, ClassNode type) {
          if (!type.isUsingGenerics()) return type;
          Map<String, GenericsType> connections = new HashMap();
          //TODO: inner classes mean a different this-type. This is ignored here!
          extractGenericsConnections(connections, typeCheckingContext.getEnclosingClassNode(), an.getDeclaringClass());
          type= applyGenericsContext(connections, type);
          return type;
      }
docs: resolves a Field or Property node generics by using the current class and
  the declaring class to extract the right meaning of the generics symbols
  @param an a FieldNode or PropertyNode
  @param type the origin type
  @return the new ClassNode with corrected generics