Codota Logo
FqnIndexer.findAll
Code IndexAdd Codota to your IDE (free)

How to use
findAll
method
in
rocks.inspectit.server.instrumentation.classcache.index.FqnIndexer

Best Java code snippets using rocks.inspectit.server.instrumentation.classcache.index.FqnIndexer.findAll (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

  @Override
  public Collection<Type> call() throws Exception {
    return fqnIndexer.findAll();
  }
});
origin: inspectIT/inspectIT

  @Override
  public Collection<ImmutableType> call() throws Exception {
    Collection<ImmutableType> result = new ArrayList<>();
    for (ImmutableType type : fqnIndexer.findAll()) {
      if (type.isClass() && type.isInitialized()) {
        if (type.castToClass().hasInstrumentationPoints()) {
          result.add(type);
        }
      }
    }
    return result;
  }
});
origin: inspectIT/inspectIT

  @Test
  @SuppressWarnings("unchecked")
  public void exceptionInCallable() throws Exception {
    when(fqnIndexer.findAll()).thenThrow(RuntimeException.class);
    Collection<? extends ImmutableType> result = lookup.findInstrumentedTypes();
    verify(classCache).executeWithReadLock(any(Callable.class));
    verify(fqnIndexer).findAll();
    verifyNoMoreInteractions(fqnIndexer, classCache);
    verifyZeroInteractions(hashIndexer);
    assertThat(result, hasSize(0));
  }
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void typeNotAClass() throws Exception {
  when(fqnIndexer.findAll()).thenReturn(Arrays.asList(type));
  when(type.isClass()).thenReturn(false);
  Collection<? extends ImmutableType> result = lookup.findInstrumentedTypes();
  verify(classCache).executeWithReadLock(any(Callable.class));
  verify(fqnIndexer).findAll();
  verifyNoMoreInteractions(fqnIndexer, classCache);
  verifyZeroInteractions(hashIndexer);
  assertThat(result, hasSize(0));
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void typeNotInitialized() throws Exception {
  when(fqnIndexer.findAll()).thenReturn(Arrays.asList(type));
  when(type.isClass()).thenReturn(true);
  when(type.isInitialized()).thenReturn(false);
  Collection<? extends ImmutableType> result = lookup.findInstrumentedTypes();
  verify(classCache).executeWithReadLock(any(Callable.class));
  verify(fqnIndexer).findAll();
  verifyNoMoreInteractions(fqnIndexer, classCache);
  verifyZeroInteractions(hashIndexer);
  assertThat(result, hasSize(0));
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void noClassesLoaded() throws Exception {
  Collection<? extends ImmutableType> result = lookup.findInstrumentedTypes();
  verify(classCache).executeWithReadLock(any(Callable.class));
  verify(fqnIndexer).findAll();
  verifyNoMoreInteractions(fqnIndexer, classCache);
  verifyZeroInteractions(hashIndexer);
  assertThat(result, hasSize(0));
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void noInstrumentedTypes() throws Exception {
  when(fqnIndexer.findAll()).thenReturn(Arrays.asList(type));
  when(type.isClass()).thenReturn(true);
  when(type.isInitialized()).thenReturn(true);
  when(type.castToClass()).thenReturn(classType);
  when(classType.hasInstrumentationPoints()).thenReturn(false);
  Collection<? extends ImmutableType> result = lookup.findInstrumentedTypes();
  verify(classCache).executeWithReadLock(any(Callable.class));
  verify(fqnIndexer).findAll();
  verifyNoMoreInteractions(fqnIndexer, classCache);
  verifyZeroInteractions(hashIndexer);
  assertThat(result, hasSize(0));
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void find() throws Exception {
  when(fqnIndexer.findAll()).thenReturn(Arrays.asList(type));
  when(type.isClass()).thenReturn(true);
  when(type.isInitialized()).thenReturn(true);
  when(type.castToClass()).thenReturn(classType);
  when(classType.hasInstrumentationPoints()).thenReturn(true);
  Collection<ImmutableType> result = (Collection<ImmutableType>) lookup.findInstrumentedTypes();
  verify(classCache).executeWithReadLock(any(Callable.class));
  verify(fqnIndexer).findAll();
  verifyNoMoreInteractions(fqnIndexer, classCache);
  verifyZeroInteractions(hashIndexer);
  assertThat(result, hasSize(1));
  assertThat(result, hasItem(type));
}
origin: inspectIT/inspectIT

  @Test
  public void findAll() {
    ClassType stringType = new ClassType(String.class.getName());
    ClassType objectType = new ClassType(Object.class.getName());
    ClassType thisType = new ClassType(FqnIndexer.class.getName());
    indexer.index(stringType);
    indexer.index(thisType);
    indexer.index(objectType);
    Collection<ClassType> types = indexer.findAll();
    assertThat(types, hasSize(3));
    assertThat(types, hasItem(stringType));
    assertThat(types, hasItem(objectType));
    assertThat(types, hasItem(thisType));
  }
}
rocks.inspectit.server.instrumentation.classcache.indexFqnIndexerfindAll

Javadoc

Finds all indexed types.

Popular methods of FqnIndexer

  • findByPattern
    Finds types by IMatchPattern. FQN of each returned type will match the given pattern.
  • findStartsWith
    Finds all NonPrimitiveTypes that start with given string.
  • index
    Index one type.
  • lookup
    Finds type by exact FQN name.
  • addOrUpdate
  • findRetrieveIndexFor
    Finds index for a FQN to retrieve.
  • findStartsWithMinMaxIndexes
    Find elements that starts with given String.
  • getAt
  • getLowerInt
  • getUpperInt
  • midpoint
  • pack
  • midpoint,
  • pack,
  • remove,
  • size

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now