@Test public void testTypeLiteral() throws Exception { Matcher<Class> classMatcher = createMock(Matcher.class); expect(classMatcher.matches(MatchingClass.class)).andReturn(true); expect(classMatcher.matches(NotMatchingClass.class)).andReturn(false); replay(classMatcher); Matcher<TypeLiteral> underTest = ShiroMatchers.typeLiteral(classMatcher); assertTrue(underTest.matches(TypeLiteral.get(MatchingClass.class))); assertFalse(underTest.matches(TypeLiteral.get(NotMatchingClass.class))); verify(classMatcher); }
public static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher) { return new AbstractMatcher<TypeLiteral>() { public boolean matches(TypeLiteral typeLiteral) { return classMatcher.matches(typeLiteral.getRawType()); } }; }
ShiroMatchers { public static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher) { return new AbstractMatcher<TypeLiteral>() { public boolean matches(TypeLiteral typeLiteral) { return classMatcher.matches(typeLiteral.getRawType()); } }; } }
ShiroMatchers { public static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher) { return new AbstractMatcher<TypeLiteral>() { public boolean matches(TypeLiteral typeLiteral) { return classMatcher.matches(typeLiteral.getRawType()); } }; }  }
ShiroMatchers { public static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher) { return new AbstractMatcher<TypeLiteral>() { public boolean matches(TypeLiteral typeLiteral) { return classMatcher.matches(typeLiteral.getRawType()); } }; }  static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher); }
ShiroMatchers { public static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher) { return new AbstractMatcher<TypeLiteral>() { public boolean matches(TypeLiteral typeLiteral) { return classMatcher.matches(typeLiteral.getRawType()); } }; }  static Matcher<TypeLiteral> typeLiteral(final Matcher<Class> classMatcher); static Matcher<Class> ANY_PACKAGE; }