Package org.apache.hivemind

Examples of org.apache.hivemind.Location


        assertEquals(false, l1.equals(new LocationImpl(_resource1, 10, 1)));
    }

    public void testEqualsFull()
    {
        Location l1 = new LocationImpl(_resource1, 10, 5);

        assertEquals(true, l1.equals(new LocationImpl(_resource1, 10, 5)));
        assertEquals(false, l1.equals(new LocationImpl(_resource1, 10, 6)));
        assertEquals(false, l1.equals(new LocationImpl(_resource1, 11, 5)));
        assertEquals(false, l1.equals(new LocationImpl(_resource2, 10, 5)));
    }
View Full Code Here


        while (i.hasNext())
        {
            TranslatorContribution c = (TranslatorContribution) i.next();

            String name = c.getName();
            Location oldLocation = (Location) locations.get(name);

            if (oldLocation != null)
            {
                _errorHandler.error(LOG, ImplMessages.duplicateTranslatorName(name, oldLocation), c
                        .getLocation(), null);
View Full Code Here

    public boolean equals(Object other)
    {
        if (!(other instanceof Location))
            return false;

        Location l = (Location) other;

        if (_lineNumber != l.getLineNumber())
            return false;

        if (_columnNumber != l.getColumnNumber())
            return false;

        return _resource.equals(l.getResource());
    }
View Full Code Here

                {
                    _filter = parseMethodPattern(_methodPattern);
                }
                catch (RuntimeException ex)
                {
                    Location l = HiveMind.findLocation(new Object[]
                    { _patternValue, ex });

                    if (l == null)
                        throw ex;
View Full Code Here

    }

    public void testMissingSymbol()
    {
        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
        Location l = newLocation();

        MockControl control = newControl(SymbolSource.class);
        SymbolSource source = (SymbolSource) control.getMock();

        // Training
View Full Code Here

    }

    public void testServicePropertyObjectProviderWithInvalidLocator()
    {
        ServicePropertyObjectProvider p = new ServicePropertyObjectProvider();
        Location l = newLocation();

        try
        {
            p.provideObject(null, null, "MyService", l);
            unreachable();
View Full Code Here

    public void testDefaultErrorHandlerWithLocation()
    {
        Log log = (Log) newMock(Log.class);

        Resource r = new ClasspathResource(new DefaultClassResolver(), "/foo/bar/Baz.module");
        Location l = new LocationImpl(r, 13);

        Throwable ex = new IllegalArgumentException();

        log.error("Error at classpath:/foo/bar/Baz.module, line 13: Bad frob value.", ex);
View Full Code Here

    }

    public void testParseExceptionWithLocation()
    {
        Resource r = getResource("MethodSubject.class");
        Location l = new LocationImpl(r, 3);

        MethodSubject s = new MethodSubject();
        s.setLocation(l);

        _m.put("*(", s);
View Full Code Here

    public void testServiceNotDirect() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IComponent c = newComponent();
        Location l = newLocation();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
        trainGetParameter(cycle, ServiceConstants.SESSION, null);
View Full Code Here

    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IDirect d = newDirect();
        WebRequest request = newWebRequest(null);
        Location l = newLocation();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
        trainGetParameter(cycle, ServiceConstants.SESSION, "T");
View Full Code Here

TOP

Related Classes of org.apache.hivemind.Location

Copyright © 2018 www.massapicom. 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.