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

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

Best Java code snippets using rocks.inspectit.server.instrumentation.classcache.index.FqnIndexer.index (Showing top 11 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

@Test
public void notFound() {
  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);
  ClassType lookup = indexer.lookup("nonExistingType");
  assertThat(indexer, hasSize(3));
  assertThat(lookup, is(nullValue()));
}
origin: inspectIT/inspectIT

@Test
public void sameFqnTwice() {
  ClassType stringType1 = new ClassType(String.class.getName());
  ClassType stringType2 = new ClassType(String.class.getName());
  indexer.index(stringType1);
  indexer.index(stringType2);
  ClassType lookup = indexer.lookup(String.class.getName());
  assertThat(indexer, hasSize(1));
  assertThat(lookup == stringType2, is(true));
}
origin: inspectIT/inspectIT

  @Test
  public void replace() {
    ClassType stringType = new ClassType(String.class.getName());
    ClassType objectType = new ClassType(Object.class.getName());
    ClassType thisType = new ClassType(FqnIndexer.class.getName());
    ClassType secondObjectType = new ClassType(Object.class.getName());
    indexer.index(stringType);
    indexer.index(thisType);
    indexer.index(objectType);
    indexer.index(secondObjectType);
    ClassType lookup = indexer.lookup(Object.class.getName());
    assertThat(indexer, hasSize(3));
    assertThat(System.identityHashCode(lookup), is(System.identityHashCode(secondObjectType)));
  }
}
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));
  }
}
origin: inspectIT/inspectIT

  @Test
  public void notFound() {
    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(new ClassType("a"));
    indexer.index(new ClassType("java.nolang"));
    indexer.index(objectType);
    // middle
    Collection<ClassType> results = indexer.findStartsWith("aa");
    assertThat(results, is(empty()));
    results = indexer.findStartsWith("java.lang.something");
    assertThat(results, is(empty()));
    results = indexer.findStartsWith("ww");
    assertThat(results, is(empty()));
  }
}
origin: inspectIT/inspectIT

@Test
public void equalsPattern() {
  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(new ClassType("a"));
  indexer.index(new ClassType("java.nolang"));
  indexer.index(objectType);
  EqualsMatchPattern equalsMatchPattern = new EqualsMatchPattern(FqnIndexer.class.getName());
  Collection<ClassType> results = indexer.findByPattern(equalsMatchPattern);
  assertThat(results, hasSize(1));
  for (ClassType classType : results) {
    assertThat(equalsMatchPattern.match(classType.getFQN()), is(true));
  }
}
origin: inspectIT/inspectIT

@Test
public void wildcardPattern() {
  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(new ClassType("a"));
  indexer.index(new ClassType("java.nolang"));
  indexer.index(objectType);
  WildcardMatchPattern wildcardMatchPattern = new WildcardMatchPattern("java*lang");
  Collection<ClassType> results = indexer.findByPattern(wildcardMatchPattern);
  assertThat(results, hasSize(1));
  for (ClassType classType : results) {
    assertThat(wildcardMatchPattern.match(classType.getFQN()), is(true));
  }
}
origin: inspectIT/inspectIT

@Test
public void wildcardPatternStarFirstLast() {
  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(new ClassType("a"));
  indexer.index(new ClassType("java.nolang"));
  indexer.index(objectType);
  WildcardMatchPattern wildcardMatchPattern = new WildcardMatchPattern("*lang*");
  Collection<ClassType> results = indexer.findByPattern(wildcardMatchPattern);
  assertThat(results, hasSize(3));
  for (ClassType classType : results) {
    assertThat(wildcardMatchPattern.match(classType.getFQN()), is(true));
  }
}
origin: inspectIT/inspectIT

@Test
public void lookup() {
  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(new ClassType("a"));
  indexer.index(new ClassType("java.nolang"));
  indexer.index(objectType);
  ClassType stringLookup = indexer.lookup(stringType.getFQN());
  ClassType objectLookup = indexer.lookup(objectType.getFQN());
  ClassType thisTypeLookup = indexer.lookup(thisType.getFQN());
  assertThat(indexer, hasSize(5));
  assertThat(stringLookup, is(stringType));
  assertThat(objectLookup, is(objectType));
  assertThat(thisTypeLookup, is(thisType));
}
origin: inspectIT/inspectIT

@Test
public void found() {
  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(new ClassType("a"));
  indexer.index(new ClassType("java.nolang"));
  indexer.index(objectType);
  // middle
  Collection<ClassType> results = indexer.findStartsWith("java.lang");
  assertThat(results, hasSize(2));
  for (ClassType classType : results) {
    assertThat(classType.getFQN().startsWith("java.lang"), is(true));
  }
  // end
  results = indexer.findStartsWith("java.nolang");
  assertThat(results, hasSize(1));
  for (ClassType classType : results) {
    assertThat(classType.getFQN().startsWith("java.nolang"), is(true));
  }
  // begin
  results = indexer.findStartsWith("a");
  assertThat(results, hasSize(1));
  for (ClassType classType : results) {
    assertThat(classType.getFQN().startsWith("a"), is(true));
  }
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public void informNodeChange(NodeEvent event) {
  if (NodeEventType.NEW.equals(event.getEventType())) {
    index((E) event.getType());
  } else if (NodeEventType.REMOVED.equals(event.getEventType())) {
    remove(event.getType());
  }
}
rocks.inspectit.server.instrumentation.classcache.indexFqnIndexerindex

Javadoc

Index one type.

Popular methods of FqnIndexer

  • findAll
    Finds all indexed types.
  • findByPattern
    Finds types by IMatchPattern. FQN of each returned type will match the given pattern.
  • findStartsWith
    Finds all NonPrimitiveTypes that start with given string.
  • 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

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • JTable (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Join (org.hibernate.mapping)
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