Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.Component


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

            String id = annotation.id();

            if (InternalUtils.isBlank(id))
                id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format(
                    "%s = (%s) %s.getEmbeddedComponent(\"%s\");",
View Full Code Here


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

            String id = annotation.id();

            if (InternalUtils.isBlank(id))
                id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format(
                    "%s = (%s) %s.getEmbeddedComponent(\"%s\");",
View Full Code Here

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

            String id = annotation.id();

            if (InternalUtils.isBlank(id)) id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            Location location = new StringLocation(String.format("%s.%s", transformation
                    .getClassName(), fieldName), 0);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type, annotation.inheritInformalParameters(), location);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format("%s = (%s) %s.getEmbeddedComponent(\"%s\");", fieldName, type,
                                        transformation.getResourcesFieldName(), id);
View Full Code Here

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

            String id = annotation.id();

            if (InternalUtils.isBlank(id)) id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            Location location = new StringLocation(String.format("%s.%s", transformation
                    .getClassName(), fieldName), 0);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type, location);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format(
                    "%s = (%s) %s.getEmbeddedComponent(\"%s\");",
View Full Code Here

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

            String id = annotation.id();

            if (InternalUtils.isBlank(id)) id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            Location location = new StringLocation(String.format("%s.%s", transformation
                    .getClassName(), fieldName), 0);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type, location);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format(
                    "%s = (%s) %s.getEmbeddedComponent(\"%s\");",
View Full Code Here

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

            String id = annotation.id();

            if (InternalUtils.isBlank(id)) id = InternalUtils.stripMemberPrefix(fieldName);

            String type = transformation.getFieldType(fieldName);

            Location location = new StringLocation(String.format("%s.%s", transformation
                    .getClassName(), fieldName), 0);

            MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation
                    .type(), type, annotation.inheritInformalParameters(), location);

            addParameters(embedded, annotation.parameters());

            transformation.makeReadOnly(fieldName);

            String body = String.format("%s = (%s) %s.getEmbeddedComponent(\"%s\");", fieldName, type,
                                        transformation.getResourcesFieldName(), id);
View Full Code Here

TOP

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

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.