Examples of matches()


Examples of org.pf.text.StringPattern.matches()

   
    iterator = this.getStringPatterns().iterator() ;
    while ( iterator.hasNext() )
    {
      pattern = (StringPattern)iterator.next() ;
      if ( pattern.matches( name ) )
        return true ;
    } // while
   
    return false ; // No pattern matched
  } // checkAgainstPatterns

Examples of org.projectforge.user.UserRight.matches()

    Validate.notNull(user);
    Validate.notNull(values);
    final UserRightDO rightDO = user.getRight(rightId);
    final UserRight right = userRights.getRight(rightId);
    for (final UserRightValue value : values) {
      if ((rightDO == null || rightDO.getValue() == null) && right.matches(userGroupCache, user, value) == true) {
        return true;
      }
      if (rightDO != null && rightDO.getValue() == value) {
        if (right != null && right.isAvailable(userGroupCache, user, value) == true) {
          return true;

Examples of org.serviceconnector.service.SubscriptionMask.matches()

    SubscriptionMask clnMask = new SubscriptionMask(clientMask);
    SCMPMessage publishMsg = new SCMPMessage();

    // missing X in mask
    publishMsg.setHeader(SCMPHeaderAttributeKey.MASK, "0000121%%%%%%%%%%%%%%%-----------------------");
    Assert.assertFalse(clnMask.matches(publishMsg));

    // missing X in mask
    publishMsg.setHeader(SCMPHeaderAttributeKey.MASK, "000012100012832102FADF-----------------------");
    Assert.assertFalse(clnMask.matches(publishMsg));
  }

Examples of org.servicemix.jbi.container.SubscriptionSpec.matches()

        List result = null;
        for (Iterator iter = subscriptions.entrySet().iterator(); iter.hasNext();) {
            Map.Entry entry = (Map.Entry) iter.next();

            SubscriptionSpec subscription = (SubscriptionSpec) entry.getKey();
            if (subscription.matches(registry,exchange)) {
                if (result == null) {
                    result = new ArrayList();
                }
                InternalEndpoint endpoint = (InternalEndpoint) entry.getValue();
                result.add(endpoint);

Examples of org.skyscreamer.jsonassert.Customization.matches()

    @Override
    public void compareValues(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) throws JSONException {
        Customization customization = getCustomization(prefix);
        if (customization != null) {
            try {
              if (!customization.matches(prefix, actualValue, expectedValue, result)) {
                    result.fail(prefix, expectedValue, actualValue);
                }
            }
            catch (ValueMatcherException e) {
                result.fail(prefix, e);

Examples of org.springframework.aop.ClassFilter.matches()

    assertTrue(exceptionFilter.matches(RuntimeException.class));
    assertFalse(exceptionFilter.matches(TestBean.class));
    assertFalse(itbFilter.matches(Exception.class));
    assertTrue(itbFilter.matches(TestBean.class));
    ClassFilter union = ClassFilters.union(exceptionFilter, itbFilter);
    assertTrue(union.matches(RuntimeException.class));
    assertTrue(union.matches(TestBean.class));
  }
 
  public void testIntersection() {
    assertTrue(exceptionFilter.matches(RuntimeException.class));

Examples of org.springframework.aop.IntroductionAwareMethodMatcher.matches()

    for (Iterator it = classes.iterator(); it.hasNext();) {
      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }

Examples of org.springframework.aop.MethodMatcher.matches()

      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }

Examples of org.springframework.aop.aspectj.AspectJExpressionPointcut.matches()

    AspectJExpressionPointcut iOtherPc = new AspectJExpressionPointcut();
    iOtherPc.setExpression(matchesIOther);
   
    assertTrue(testBeanPc.matches(TestBean.class));
    assertTrue(testBeanPc.matches(getAge, TestBean.class));
    assertTrue(iOtherPc.matches(OtherIOther.class.getMethod("absquatulate", null),
        OtherIOther.class));
 
    assertFalse(testBeanPc.matches(OtherIOther.class.getMethod("absquatulate", null),
        OtherIOther.class));
  }

Examples of org.springframework.data.mapping.context.AbstractMappingContext.PersistentPropertyFilter.PropertyMatch.matches()

  @Test
  public void matchesFieldByConcreteNameAndType() throws Exception {

    PropertyMatch match = new PropertyMatch("name", "java.lang.String");
    assertThat(match.matches("this$0", Object.class), is(false));
    assertThat(match.matches("this$1", Object.class), is(false));
    assertThat(match.matches("name", String.class), is(true));
  }

  @Test
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.