Examples of JavaModelSourceLocation


Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

      Set<IBeanMetadata> beanMetaDataSet, String annotationTypeName, String annotationTypeNameToCheck) {
    if (SUPPORTED_STEREOTYPE_ANNOTATIONS.contains(annotationTypeNameToCheck)) {
      try {
        beanMetaDataSet
            .add(new StereotypeAnnotationMetadata(bean, annotationTypeName, visitor.getTypeLevelAnnotation(
                annotationTypeName).getMembers(), new JavaModelSourceLocation(beanType)));
      }
      catch (JavaModelException e) {
        // Nothing to report here
      }
      return true;
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

          || visitor.hasMethodLevelAnnotations(TRANSACTIONAL_CLASS)) {
        Set<IMethodMetadata> methodMetaData = new HashSet<IMethodMetadata>();
        for (Map.Entry<IMethod, Annotation> entry : visitor.getMethodLevelAnnotations(TRANSACTIONAL_CLASS)
            .entrySet()) {
          methodMetaData.add(new TransactionalMethodAnnotationMetadata(TRANSACTIONAL_CLASS, entry.getKey()
              .getHandleIdentifier(), entry.getValue().getMembers(), new JavaModelSourceLocation(entry
              .getKey())));
        }
        beanMetaDataSet.add(new TransactionalAnnotationMetadata(bean, TRANSACTIONAL_CLASS, (visitor
            .hasTypeLevelAnnotations(TRANSACTIONAL_CLASS) ? visitor.getTypeLevelAnnotation(
            TRANSACTIONAL_CLASS).getMembers() : null), new JavaModelSourceLocation(type), methodMetaData));
      }
    }
    catch (JavaModelException e) {
      // just fail quietly
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

  public IJavaElement getJavaElement() {
    return this.type;
  }
 
  public JavaModelSourceLocation createSourceLocation() throws JavaModelException {
    return new JavaModelSourceLocation(type);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

        Set<IMethodMetadata> methodMetaData = new HashSet<IMethodMetadata>();
        for (Map.Entry<IMethod, Annotation> entry : visitor.getMethodLevelAnnotations(
            METHOD_ANNOTATION_CLASSES).entrySet()) {
          methodMetaData.add(new AspectMethodAnnotationMetadata(entry.getValue()
              .getAnnotationClass(), entry.getKey().getHandleIdentifier(), entry
              .getValue().getMembers(), new JavaModelSourceLocation(entry.getKey())));
        }
        beanMetaDataSet.add(new AspectAnnotationMetadata(bean, ASPECT_ANNOTATION_CLASS,
            (visitor.hasTypeLevelAnnotations(ASPECT_ANNOTATION_CLASS) ? visitor
                .getTypeLevelAnnotation(ASPECT_ANNOTATION_CLASS).getMembers()
                : null), new JavaModelSourceLocation(type), methodMetaData));
      }
    }
    catch (JavaModelException e) {
      // just fail quietly
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

        Set<IMethodMetadata> methodMetaData = new HashSet<IMethodMetadata>();
        for (Map.Entry<IMethod, Annotation> entry : visitor
            .getMethodLevelAnnotations(BEAN_ANNOTATION_CLASSES).entrySet()) {
          methodMetaData.add(new BeanMethodAnnotationMetadata(entry.getValue().getAnnotationClass(), entry
              .getKey().getHandleIdentifier(), entry.getValue().getMembers(),
              new JavaModelSourceLocation(entry.getKey())));
        }
        beanMetaDataSet.add(new ConfigurationAnnotationMetadata(bean, CONFIGURATION_ANNOTATION_CLASS, (visitor
            .hasTypeLevelAnnotations(CONFIGURATION_ANNOTATION_CLASS) ? visitor.getTypeLevelAnnotation(
            CONFIGURATION_ANNOTATION_CLASS).getMembers() : null), new JavaModelSourceLocation(type),
            methodMetaData));
      }
    }
    catch (JavaModelException e) {
      // just fail quietly
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

        if (visitor.hasMethodLevelAnnotations(annotationClass)) {
          for (Map.Entry<IMethod, Annotation> entry : visitor.getMethodLevelAnnotations(annotationClass)
              .entrySet()) {
            methodMetaData.add(new AutowireMethodAnnotationMetadata(entry.getValue().getAnnotationClass(),
                entry.getKey().getHandleIdentifier(), entry.getValue().getMembers(),
                new JavaModelSourceLocation(entry.getKey())));
          }
        }
        if (visitor.hasFieldLevelAnnotations(annotationClass)) {
          for (Map.Entry<IField, Annotation> entry : visitor.getFieldLevelAnnotations(annotationClass)
              .entrySet()) {
            methodMetaData.add(new AutowireMethodAnnotationMetadata(entry.getValue().getAnnotationClass(),
                entry.getKey().getHandleIdentifier(), entry.getValue().getMembers(),
                new JavaModelSourceLocation(entry.getKey())));
          }
        }
        if (methodMetaData.size() > 0) {
          beanMetaDataSet.add(new AutowireAnnotationMetadata(bean, annotationClass,
              new JavaModelSourceLocation(type), methodMetaData));
        }
      }
    }
    catch (JavaModelException e) {
      // just fail quietly
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

        Set<IMethodMetadata> methodMetaData = new HashSet<IMethodMetadata>();
        for (Map.Entry<IMethod, Annotation> entry : visitor.getMethodLevelAnnotations(
            REQUEST_MAPPING_CLASS).entrySet()) {
          methodMetaData.add(new RequestMappingMethodAnnotationMetadata(
              REQUEST_MAPPING_CLASS, entry.getKey().getHandleIdentifier(), entry
                  .getValue().getMembers(), new JavaModelSourceLocation(entry
                  .getKey())));
        }
        beanMetaDataSet
            .add(new RequestMappingAnnotationMetadata(bean, REQUEST_MAPPING_CLASS,
                (visitor.hasTypeLevelAnnotations(REQUEST_MAPPING_CLASS) ? visitor
                    .getTypeLevelAnnotation(REQUEST_MAPPING_CLASS).getMembers()
                    : null), new JavaModelSourceLocation(type), methodMetaData,
                type.getHandleIdentifier()));
      }
    }
    catch (JavaModelException e) {
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

      // make sure that all components that come through are safe for the model
      if (componentDefinition.getSource() == null) {
        if (componentDefinition instanceof BeanComponentDefinition) {
          try {
            ((AbstractBeanDefinition) ((BeanComponentDefinition) componentDefinition).getBeanDefinition())
            .setSource(new JavaModelSourceLocation(configClass));
          } catch (JavaModelException e) {
            SpringCore.log(e);
          }
        }
      }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

        String methodName = method.getElementName();

        try {
          new PartTree(methodName, domainClass);
        } catch (PropertyReferenceException e) {
          element.setElementSourceLocation(new JavaModelSourceLocation(
              method));
          ValidationProblemAttribute start = new ValidationProblemAttribute(
              IMarker.CHAR_START, method.getNameRange()
                  .getOffset());
          ValidationProblemAttribute end = new ValidationProblemAttribute(
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.java.JavaModelSourceLocation

            if (propertyMethod != null) {
              Class<?> propertyReturnType = propertyMethod.getReturnType();
              String propertySimpleType = propertyReturnType.getSimpleName();
              String paramSimpleType = Signature.getSignatureSimpleName(paramTypeSignature);
              if (propertySimpleType != null && !(propertySimpleType.equals(paramSimpleType))) {
                element.setElementSourceLocation(new JavaModelSourceLocation(params[0]));
                ISourceRange paramSourceRange = params[0].getSourceRange();
                ValidationProblemAttribute start = new ValidationProblemAttribute(
                    IMarker.CHAR_START,  paramSourceRange.getOffset());
                ValidationProblemAttribute end = new ValidationProblemAttribute(
                    IMarker.CHAR_END, paramSourceRange.getOffset() + paramSourceRange.getLength());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.