Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.Inject


        String resourcesFieldName = transformation.getResourcesFieldName();

        for (String fieldName : fieldNames)
        {
            Inject annotation = transformation.getFieldAnnotation(fieldName, Inject.class);

            if (annotation == null)
                continue;

            String blockId = getBlockId(fieldName, annotation);
View Full Code Here


    public void transform(ClassTransformation transformation, MutableComponentModel model)
    {
        for (String fieldName : transformation.findFieldsWithAnnotation(Inject.class))
        {
            Inject annotation = transformation.getFieldAnnotation(fieldName, Inject.class);

            String value = annotation.value();

            // A later worker will tackle this.

            if (InternalUtils.isBlank(value))
                continue;
View Full Code Here

    @Test
    public void asset_field_annotation_has_blank_value()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        Inject annotation = newMock(Inject.class);

        train_findFieldsOfType(ct, InjectAssetWorker.ASSET_TYPE_NAME, "_fred");

        train_getFieldAnnotation(ct, "_fred", Inject.class, annotation);
View Full Code Here

    @Test
    public void asset_field_with_full_annotation()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        Inject annotation = newMock(Inject.class);
        AssetSource source = newMock(AssetSource.class);
        Resource r = newResource();

        train_findFieldsOfType(ct, InjectAssetWorker.ASSET_TYPE_NAME, "_fred");
View Full Code Here

        builder.begin();

        for (String name : names)
        {

            Inject annotation = transformation.getFieldAnnotation(name, Inject.class);

            // If the field has no annotation, or no value for its annotation, that's probably
            // a programmer error, but we'll let the later Inject-related workers complain about it.

            if (annotation == null)
                continue;

            String path = annotation.value();

            if (path.equals(""))
                continue;

            // This is tricky because we support sublcasses; if we ask the component at runtime for
View Full Code Here

TOP

Related Classes of org.apache.tapestry.annotations.Inject

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.