Examples of Mixin


Examples of org.apache.tapestry5.annotations.Mixin

    {
        List<String> fields = transformation.findFieldsWithAnnotation(Mixin.class);

        for (String fieldName : fields)
        {
            Mixin annotation = transformation.getFieldAnnotation(fieldName, Mixin.class);

            String mixinType = annotation.value();

            String fieldType = transformation.getFieldType(fieldName);

            String mixinClassName = InternalUtils.isBlank(mixinType) ? fieldType : resolver
                    .resolveMixinTypeToClassName(mixinType);
View Full Code Here

Examples of org.apache.tapestry5.annotations.Mixin

    public void field_with_explicit_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("Bar");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

Examples of org.apache.tapestry5.annotations.Mixin

    public void field_with_no_specific_mixin_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

Examples of org.apache.tapestry5.annotations.Mixin

        expect(resolver.resolveMixinTypeToClassName(mixinType)).andReturn(mixinClassName);
    }

    private Mixin newMixin(String value)
    {
        Mixin annotation = newMock(Mixin.class);

        expect(annotation.value()).andReturn(value);

        return annotation;
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.Mixin

    {
        List<String> fields = transformation.findFieldsWithAnnotation(Mixin.class);

        for (String fieldName : fields)
        {
            Mixin annotation = transformation.getFieldAnnotation(fieldName, Mixin.class);

            transformation.claimField(fieldName, annotation);
           
            String mixinType = annotation.value();

            String fieldType = transformation.getFieldType(fieldName);

            String mixinClassName = InternalUtils.isBlank(mixinType) ? fieldType : resolver
                    .resolveMixinTypeToClassName(mixinType);
View Full Code Here

Examples of org.chromattic.api.annotations.Mixin

    Set<PropertyMapping> propertyMappings = new HashSet<PropertyMapping>();
    Set<MethodMapping> methodMappings = new HashSet<MethodMapping>();
    BeanInfo info = new BeanInfo(javaClass);

    //
    Mixin mixin = new AnnotationIntrospector<Mixin>(Mixin.class).resolve(javaClass);
    Set<String> mixinNames = new HashSet<String>();
    if (mixin != null) {
      for (String mixinName : mixin.name()) {
        mixinNames.add(mixinName);
      }
    }

    // Property
View Full Code Here

Examples of org.codehaus.aspectwerkz.Mixin

     *
     * @param index the index of the introduction (aspect in this case)
     * @return the the mixin (aspect in this case)
     */
    public Mixin getMixin(final int index) {
        Mixin mixin;
        try {
            mixin = m_mixins[index - 1];
        } catch (Throwable e1) {
            initialize();
            try {
View Full Code Here

Examples of org.codehaus.aspectwerkz.Mixin

     */
    public Mixin getMixin(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("introduction name can not be null");
        }
        Mixin introduction;
        try {
            introduction = m_mixins[m_definition.getMixinIndexByName(name) - 1];
        } catch (Throwable e1) {
            initialize();
            try {
View Full Code Here

Examples of org.codehaus.aspectwerkz.Mixin

     *
     * @param index the index of the introduction (aspect in this case)
     * @return the the mixin (aspect in this case)
     */
    public Mixin getMixin(final int index) {
        Mixin mixin;
        try {
            mixin = m_mixins[index - 1];
        }
        catch (Throwable e1) {
            initialize();
View Full Code Here

Examples of org.codehaus.aspectwerkz.Mixin

    public Mixin getMixin(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("introduction name can not be null");
        }

        Mixin introduction;
        try {
            introduction = m_mixins[m_definition.getMixinIndexByName(name) - 1];
        }
        catch (Throwable e1) {
            initialize();
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.