當前位置: 首頁>>代碼示例>>Java>>正文


Java TestFileNameFilter類代碼示例

本文整理匯總了Java中org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter的典型用法代碼示例。如果您正苦於以下問題:Java TestFileNameFilter類的具體用法?Java TestFileNameFilter怎麽用?Java TestFileNameFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TestFileNameFilter類屬於org.apache.hadoop.hbase.ClassTestFinder包,在下文中一共展示了TestFileNameFilter類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testInterfaceAudienceAnnotation

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules contain
 * {@link InterfaceAudience} annotations.
 */
@Test
public void testInterfaceAudienceAnnotation()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are not in a hadoop-compat module
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are NOT annotated with InterfaceAudience
  // AND are NOT from Clover rewriting sources
  ClassFinder classFinder = new ClassFinder(
    new And(new MainCodeResourcePathFilter(),
            new TestFileNameFilter()),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceAudienceAnnotatedClassFilter()),
            new Not(new CloverInstrumentationFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  LOG.info("These are the classes that DO NOT have @InterfaceAudience annotation:");
  for (Class<?> clazz : classes) {
    LOG.info(clazz);
  }

  Assert.assertEquals("All classes should have @InterfaceAudience annotation",
    0, classes.size());
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:39,代碼來源:TestInterfaceAudienceAnnotations.java

示例2: testInterfaceStabilityAnnotation

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules that are marked
 * InterfaceAudience.Public also have {@link InterfaceStability} annotations.
 */
@Test
public void testInterfaceStabilityAnnotation()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are not in a hadoop-compat module
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are annotated with InterfaceAudience.Public
  // AND NOT annotated with InterfaceStability
  ClassFinder classFinder = new ClassFinder(
    new And(new MainCodeResourcePathFilter(),
            new TestFileNameFilter()),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new InterfaceAudiencePublicAnnotatedClassFilter(),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceStabilityAnnotatedClassFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  LOG.info("These are the classes that DO NOT have @InterfaceStability annotation:");
  for (Class<?> clazz : classes) {
    LOG.info(clazz);
  }

  Assert.assertEquals("All classes that are marked with @InterfaceAudience.Public should "
      + "have @InterfaceStability annotation as well",
    0, classes.size());
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:40,代碼來源:TestInterfaceAudienceAnnotations.java

示例3: testInterfaceAudienceAnnotation

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules contain
 * {@link InterfaceAudience} annotations.
 */
@Test
public void testInterfaceAudienceAnnotation()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are NOT annotated with InterfaceAudience
  ClassFinder classFinder = new ClassFinder(
    new MainCodeResourcePathFilter(),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceAudienceAnnotatedClassFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  LOG.info("These are the classes that DO NOT have @InterfaceAudience annotation:");
  for (Class<?> clazz : classes) {
    LOG.info(clazz);
  }

  Assert.assertEquals("All classes should have @InterfaceAudience annotation",
    0, classes.size());
}
 
開發者ID:grokcoder,項目名稱:pbase,代碼行數:35,代碼來源:TestInterfaceAudienceAnnotations.java

示例4: testInterfaceStabilityAnnotation

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules that are marked
 * InterfaceAudience.Public also have {@link InterfaceStability} annotations.
 */
@Test
public void testInterfaceStabilityAnnotation()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are annotated with InterfaceAudience.Public
  // AND NOT annotated with InterfaceStability
  ClassFinder classFinder = new ClassFinder(
    new MainCodeResourcePathFilter(),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new InterfaceAudiencePublicAnnotatedClassFilter(),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceStabilityAnnotatedClassFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  LOG.info("These are the classes that DO NOT have @InterfaceStability annotation:");
  for (Class<?> clazz : classes) {
    LOG.info(clazz);
  }

  Assert.assertEquals("All classes that are marked with @InterfaceAudience.Public should "
      + "have @InterfaceStability annotation as well",
    0, classes.size());
}
 
開發者ID:grokcoder,項目名稱:pbase,代碼行數:38,代碼來源:TestInterfaceAudienceAnnotations.java

示例5: testInterfaceAudienceAnnotation

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules contain
 * {@link InterfaceAudience} annotations.
 */
@Ignore @Test
public void testInterfaceAudienceAnnotation()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are not in a hadoop-compat module
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are NOT annotated with InterfaceAudience
  // AND are NOT from Clover rewriting sources
  ClassFinder classFinder = new ClassFinder(
    new And(new MainCodeResourcePathFilter(),
            new TestFileNameFilter()),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new Not(new ShadedProtobufClassFilter()),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceAudienceAnnotatedClassFilter()),
            new Not(new CloverInstrumentationFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);
  if (!classes.isEmpty()) {
    LOG.info("These are the classes that DO NOT have @InterfaceAudience annotation:");
    for (Class<?> clazz : classes) {
      LOG.info(Objects.toString(clazz));
    }
  }

  Assert.assertEquals("All classes should have @InterfaceAudience annotation",
    0, classes.size());
}
 
開發者ID:apache,項目名稱:hbase,代碼行數:41,代碼來源:TestInterfaceAudienceAnnotations.java

示例6: testNoInterfaceStabilityAnnotationForPublicAPI

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules that are marked
 * InterfaceAudience.Public do not have {@link InterfaceStability} annotations.
 */
@Ignore @Test
public void testNoInterfaceStabilityAnnotationForPublicAPI()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are not in a hadoop-compat module
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are annotated with InterfaceAudience.Public
  // AND annotated with InterfaceStability
  ClassFinder classFinder = new ClassFinder(
    new And(new MainCodeResourcePathFilter(),
            new TestFileNameFilter()),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new Not(new ShadedProtobufClassFilter()),
            new InterfaceAudiencePublicAnnotatedClassFilter(),
            new Not(new IsInterfaceStabilityClassFilter()),
            new InterfaceStabilityAnnotatedClassFilter())
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  if (!classes.isEmpty()) {
    LOG.info("These are the @InterfaceAudience.Public classes that have @InterfaceStability " +
        "annotation:");
    for (Class<?> clazz : classes) {
      LOG.info(Objects.toString(clazz));
    }
  }

  Assert.assertEquals("All classes that are marked with @InterfaceAudience.Public should not "
      + "have @InterfaceStability annotation",
    0, classes.size());
}
 
開發者ID:apache,項目名稱:hbase,代碼行數:44,代碼來源:TestInterfaceAudienceAnnotations.java

示例7: testInterfaceStabilityAnnotationForLimitedAPI

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
/**
 * Checks whether all the classes in client and common modules that are marked
 * InterfaceAudience.Public do not have {@link InterfaceStability} annotations.
 */
@Ignore
@Test
public void testInterfaceStabilityAnnotationForLimitedAPI()
    throws ClassNotFoundException, IOException, LinkageError {

  // find classes that are:
  // In the main jar
  // AND are not in a hadoop-compat module
  // AND are public
  // NOT test classes
  // AND NOT generated classes
  // AND are annotated with InterfaceAudience.LimitedPrivate
  // AND NOT annotated with InterfaceStability
  ClassFinder classFinder = new ClassFinder(
    new And(new MainCodeResourcePathFilter(),
            new TestFileNameFilter()),
    new Not((FileNameFilter)new TestFileNameFilter()),
    new And(new PublicClassFilter(),
            new Not(new TestClassFilter()),
            new Not(new GeneratedClassFilter()),
            new Not(new ShadedProtobufClassFilter()),
            new InterfaceAudienceLimitedPrivateAnnotatedNotConfigClassFilter(),
            new Not(new IsInterfaceStabilityClassFilter()),
            new Not(new InterfaceStabilityAnnotatedClassFilter()))
  );

  Set<Class<?>> classes = classFinder.findClasses(false);

  if (!classes.isEmpty()) {
    LOG.info("These are the @InterfaceAudience.LimitedPrivate classes that DO NOT " +
        "have @InterfaceStability annotation:");
    for (Class<?> clazz : classes) {
      LOG.info(Objects.toString(clazz));
    }
  }
  Assert.assertEquals("All classes that are marked with @InterfaceAudience.LimitedPrivate " +
      "should have @InterfaceStability annotation",
    0, classes.size());
}
 
開發者ID:apache,項目名稱:hbase,代碼行數:44,代碼來源:TestInterfaceAudienceAnnotations.java

示例8: findPublicClasses

import org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter; //導入依賴的package包/類
private Set<Class<?>> findPublicClasses()
    throws ClassNotFoundException, IOException, LinkageError {
  ClassFinder classFinder =
      new ClassFinder(new And(new MainCodeResourcePathFilter(), new TestFileNameFilter()),
          new Not((FileNameFilter) new TestFileNameFilter()),
          new And(new PublicClassFilter(), new Not(new TestClassFilter()),
              new Not(new GeneratedClassFilter()),
              new Not(new ShadedProtobufClassFilter()),
              new InterfaceAudiencePublicAnnotatedClassFilter()));
  Set<Class<?>> classes = classFinder.findClasses(false);
  return classes;
}
 
開發者ID:apache,項目名稱:hbase,代碼行數:13,代碼來源:TestInterfaceAudienceAnnotations.java


注:本文中的org.apache.hadoop.hbase.ClassTestFinder.TestFileNameFilter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。