Package org.apache.tapestry.ioc.annotations

Examples of org.apache.tapestry.ioc.annotations.IntermediateType


        if (annotation == null) return null;

        String value = annotation.value();
        Object expanded = _symbolSource.expandSymbols(value);

        IntermediateType intermediate = annotationProvider.getAnnotation(IntermediateType.class);

        if (intermediate != null) expanded = _typeCoercer.coerce(expanded, intermediate.value());

        return _typeCoercer.coerce(expanded, objectType);
    }
View Full Code Here


        ObjectLocator locator = mockObjectLocator();
        String symbolName = "example-symbol";
        String symbolValue = "symbol-value";
        Long coercedValue = 123l;
        Symbol annotation = newSymbol(symbolName);
        IntermediateType it = newIntermediateType();
        BigInteger intervalue = new BigInteger("123");

        train_getAnnotation(annotationProvider, Symbol.class, annotation);
        train_getAnnotation(annotationProvider, IntermediateType.class, it);

        train_valueForSymbol(source, symbolName, symbolValue);

        expect(it.value()).andReturn(BigInteger.class);

        train_coerce(coercer, symbolValue, BigInteger.class, intervalue);
        train_coerce(coercer, intervalue, Long.class, coercedValue);

        replay();
View Full Code Here

        if (annotation == null) return null;

        Object value = _symbolSource.valueForSymbol(annotation.value());

        IntermediateType it = annotationProvider.getAnnotation(IntermediateType.class);

        if (it != null) value = _typeCoercer.coerce(value, it.value());

        return _typeCoercer.coerce(value, objectType);
    }
View Full Code Here

        ObjectLocator locator = mockObjectLocator();
        String annotationValue = "${foo}";
        String expanded = "Foo";
        Runnable coerced = mockRunnable();
        Value annotation = newValue(annotationValue);
        IntermediateType it = newIntermediateType();
        BigDecimal intervalue = new BigDecimal("1234");

        train_getAnnotation(annotationProvider, Value.class, annotation);

        train_getAnnotation(annotationProvider, IntermediateType.class, it);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.annotations.IntermediateType

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.