Tabnine Logo
FqnIndexer.findAll
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • startActivity (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now