Examples of locate()


Examples of org.apache.wicket.core.util.resource.locator.caching.CachingResourceStreamLocator.locate()

        "extension", true)).thenReturn(srs);

    CachingResourceStreamLocator cachingLocator = new CachingResourceStreamLocator(
      resourceStreamLocator);

    cachingLocator.locate(String.class, "path", "style", "variation", null, "extension", true);
    cachingLocator.locate(String.class, "path", "style", "variation", null, "extension", true);

    // lightweight resource streams should not be cached so expect just a call to the delegate
    // for each call to the caching locator
    verify(resourceStreamLocator, times(2)).locate(String.class, "path", "style", "variation",
View Full Code Here

Examples of org.apache.wicket.core.util.resource.locator.caching.CachingResourceStreamLocator.locate()

    CachingResourceStreamLocator cachingLocator = new CachingResourceStreamLocator(
      resourceStreamLocator);

    cachingLocator.locate(String.class, "path", "style", "variation", null, "extension", true);
    cachingLocator.locate(String.class, "path", "style", "variation", null, "extension", true);

    // lightweight resource streams should not be cached so expect just a call to the delegate
    // for each call to the caching locator
    verify(resourceStreamLocator, times(2)).locate(String.class, "path", "style", "variation",
      null, "extension", true);
View Full Code Here

Examples of org.apache.wicket.util.resource.locator.IResourceStreamLocator.locate()

    Class<?> containerClass = getClass();

    while (!(containerClass.equals(MarkupComponentBorder.class)))
    {
      String path = containerClass.getName().replace('.', '/');
      IResourceStream resourceStream = locator.locate(containerClass, path, style, variation,
        locale, markupType, false);

      // Did we find it already?
      if (resourceStream != null)
      {
View Full Code Here

Examples of org.apache.wicket.util.resource.locator.IResourceStreamLocator.locate()

    // hierarchy up to MarkupContainer to find the containers markup
    // resource.
    while (containerClass != MarkupContainer.class)
    {
      String path = containerClass.getName().replace('.', '/');
      IResourceStream resourceStream = locator.locate(container.getClass(), path, style,
        variation, locale, ext, false);

      // Did we find it already?
      if (resourceStream != null)
      {
View Full Code Here

Examples of org.apache.wicket.util.resource.locator.ResourceStreamLocator.locate()

   */
  public void createAndTestResource(Path sourcePath, String style, String variation,
    Locale locale, String extension)
  {
    IResourceStreamLocator locator = new ResourceStreamLocator(sourcePath);
    IResourceStream resource = locator.locate(this.getClass(), this.getClass()
      .getName()
      .replace('.', '/'), style, variation, locale, "txt", false);
    compareFilename(resource, extension);
  }

View Full Code Here

Examples of org.apache.wicket.util.resource.locator.caching.CachingResourceStreamLocator.locate()

    IResourceStreamLocator resourceStreamLocator = mock(IResourceStreamLocator.class);

    CachingResourceStreamLocator cachingLocator = new CachingResourceStreamLocator(
      resourceStreamLocator);

    cachingLocator.locate(String.class, "path");
    cachingLocator.locate(String.class, "path");

    // there is no resource with that Key so a "miss" will be cached and expect 1 call to the
    // delegate
    verify(resourceStreamLocator, times(1)).locate(String.class, "path");
View Full Code Here

Examples of org.codehaus.jparsec.DefaultSourceLocator.locate()

* @author Ben Yu
*/
public class DefaultSourceLocatorTest extends TestCase {
  public void testLocate_onlyOneLineBreakCharacter() {
    DefaultSourceLocator locator = new DefaultSourceLocator("\n");
    Location location = locator.locate(0);
    assertEquals(new Location(1, 1), location);
    assertEquals(location, locator.locate(0));
    assertEquals(new Location(2, 1), locator.locate(1));
  }
 
View Full Code Here

Examples of org.datanucleus.StateManager.locate()

            StateManager sm = om.findStateManager(pc);
            if (om.getApiAdapter().isDeleted(pc))
            {
                try
                {
                    sm.locate();
                }
                catch (NucleusObjectNotFoundException ex)
                {
                    // the instance has been flushed, and it was not found, so we return null
                    return null;
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.locate()

            ObjectProvider sm = om.findObjectProvider(pc);
            if (om.getApiAdapter().isDeleted(pc))
            {
                try
                {
                    sm.locate();
                }
                catch (NucleusObjectNotFoundException ex)
                {
                    // the instance has been flushed, and it was not found, so we return null
                    return null;
View Full Code Here

Examples of org.eclipse.sisu.inject.BeanLocator.locate()

    public static <T> T lookup( final Key<T> key )
    {
        final BeanLocator locator = getBeanLocator();
        if ( null != locator )
        {
            final Iterator<? extends Entry<?, T>> i = locator.locate( key ).iterator();
            if ( i.hasNext() )
            {
                return i.next().getValue();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.