Examples of Mixin


Examples of OntoUML.Mixin

        if (result == null) result = caseNamedElement(meronymic);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case OntoUMLPackage.MIXIN: {
        Mixin mixin = (Mixin)theEObject;
        T result = caseMixin(mixin);
        if (result == null) result = caseSemiRigidMixin(mixin);
        if (result == null) result = caseNonRigidMixinClass(mixin);
        if (result == null) result = caseMixinClass(mixin);
        if (result == null) result = caseObjectClass(mixin);
View Full Code Here

Examples of OntoUML.Mixin

     * <!-- end-user-doc -->
     * @generated NOT
     */
    private void updateContents(MixinEditPart mixineditpart) {

      Mixin s = (Mixin) ((View) mixineditpart.getModel()).getElement();
      for (int i = 0; i < s.getAttribute().size(); i++) {
        Property p1 = (Property) s.getAttribute().get(i);
        if (p1.getAttribute().size() >= 2) {
          DatatypeAssociation d = (DatatypeAssociation) p1
              .getAttribute().get(0);
          Property p2 = (Property) p1.getAttribute().get(1);
          d.setOwner(null);
          d.setContainer(s.getContainer());
          d.setName("Name");
          p1.setAssociationEnd(d);
          p1.setName("Name");
          p2.setAssociationEnd(d);
          p2.setOwner(d);
View Full Code Here

Examples of com.alibaba.dubbo.common.bytecode.Mixin

public class MixinTest extends TestCase
{
  public void testMain() throws Exception
  {
    Mixin mixin = Mixin.mixin(new Class[]{ I1.class, I2.class, I3.class }, new Class[]{ C1.class, C2.class });
    Object o = mixin.newInstance(new Object[]{ new C1(), new C2() });
    assertEquals(o instanceof I1, true);
    assertEquals(o instanceof I2, true);
    assertEquals(o instanceof I3, true);
    ((I1)o).m1();
    ((I2)o).m2();
View Full Code Here

Examples of org.apache.tapestry.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.tapestry.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.tapestry.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.tapestry.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.tapestry.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.tapestry.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.tapestry.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
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.