Examples of IAnnotation


Examples of org.eclipse.jdt.core.IAnnotation

    if (match.getAccuracy() == SearchMatch.A_INACCURATE)
      return;
    TypeReferenceMatch refMatch = (TypeReferenceMatch)match;
   
    IType contextType = (IType) refMatch.getElement();     
    IAnnotation constraint = (IAnnotation) refMatch.getLocalElement();
   
    if (parsed.contains(constraint))
      return; //SCREW YOU ECLIPSE!!!!
   
    if (constraint.getElementName().contains("Constraints")) {
      for (Object objAnno : (Object[])constraint.getMemberValuePairs()[0].getValue()) {
        parseConstraint((IAnnotation)objAnno, contextType);
      }
    }
    else
      parseConstraint(constraint, contextType);
View Full Code Here

Examples of org.eclipse.jdt.core.IAnnotation

    if (match.getAccuracy() == SearchMatch.A_INACCURATE)
      return;
    TypeReferenceMatch refMatch = (TypeReferenceMatch)match;
   
    IType relation = (IType) refMatch.getElement();
    IAnnotation relAnno = (IAnnotation) refMatch.getLocalElement();
   
    Object[] types = (Object[])relAnno.getMemberValuePairs()[0].getValue();
    String[] qualifiedTypes = new String[types.length];
    for (int ndx = 0; ndx < qualifiedTypes.length; ndx++)
      qualifiedTypes[ndx] = Utilities.resolveType(relation, (String)types[ndx]);
    addRelation(new Relation(relation.getFullyQualifiedName(), qualifiedTypes));
View Full Code Here

Examples of org.eclipse.jdt.core.IAnnotation

    if (match.getAccuracy() == SearchMatch.A_INACCURATE)
      return;
    TypeReferenceMatch refMatch = (TypeReferenceMatch)match;
   
    IType contextType = (IType) refMatch.getElement();     
    IAnnotation infer = (IAnnotation) refMatch.getLocalElement();
   
    if (parsed.contains(infer))
      return; //SCREW YOU ECLIPSE!!!!
   
    if (infer.getElementName().contains("Infers")) {
      for (Object objAnno : (Object[])infer.getMemberValuePairs()[0].getValue()) {
        parseInferRule((IAnnotation)objAnno, contextType);
      }
    }
    else
      parseInferRule(infer, contextType);
View Full Code Here

Examples of org.testng.annotations.IAnnotation

  }

  public IAnnotation findAnnotation(Method m, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    assert a != null : "Annotation class not found:" + annotationClass;
    IAnnotation result =
      findAnnotation(m.getDeclaringClass(), m.getAnnotation(a), annotationClass,
          null, null, m);
   
    return result;
  }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

  public IAnnotation findAnnotation(Class cls, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    if (a == null) {
      throw new AssertionError("Class " + annotationClass + " doesn't have an IAnnotation");
    }
    IAnnotation result =
      findAnnotation(cls, findAnnotationInSuperClasses(cls, a), annotationClass,
          cls, null, null);

    return result;
  }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

    return result;
  }
 
  public IAnnotation findAnnotation(Constructor m, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    IAnnotation result =
      findAnnotation(m.getDeclaringClass(), m.getAnnotation(a), annotationClass,
          null, m, null);
   
    return result;
  }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

  private IAnnotation findAnnotation(Class cls, Annotation a,
      Class annotationClass,
      Class testClass, Constructor testConstructor, Method testMethod)
  {

    IAnnotation result = null;
    Pair<Annotation, Class> p1;
    Pair<Annotation, Constructor> p2;
    Pair<Annotation, Class> p3;
   
    Pair p;
View Full Code Here

Examples of org.testng.annotations.IAnnotation

      outer:
      for (Class cls : allClasses)
        try {
          if (null != cls) {
            for (Method m : cls.getMethods()) {
              IAnnotation a = annotationFinder.findAnnotation(m,
                  org.testng.annotations.IObjectFactoryAnnotation.class);
              if (null != a) {
                if (!IObjectFactory.class.isAssignableFrom(m.getReturnType())) {
                  throw new TestNGException("Return type of " + m + " is not IObjectFactory");
                }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

      try {
        for(Class annotation : allAnnotations) {
          // Try on the methods
          for(Method m : cls.getMethods()) {
            IAnnotation ma= annotationFinder.findAnnotation(m, annotation);
            if(null != ma) {
              return true;
            }
          }

          // Try on the class
        IAnnotation a= annotationFinder.findAnnotation(cls, annotation);
        if(null != a) {
          return true;
        }

        // Try on the constructors
          for(Constructor ctor : cls.getConstructors()) {
            IAnnotation ca= annotationFinder.findAnnotation(ctor, annotation);
            if(null != ca) {
              return true;
            }
          }
        }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

   */
  public static Method findFactoryMethod(Class<?> cls, IAnnotationFinder finder) {
    Method result = null;

    for (Method method : cls.getMethods()) {
      IAnnotation f = finder.findAnnotation(method, IFactoryAnnotation.class);

      if (null != f) {
        if (null != result) {
          throw new TestNGException(cls.getName() + ":  only one @Factory method allowed");
        }
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.