Search in sources :

Example 1 with BaseType

use of org.apache.cxf.tests.inherit.objects.BaseType in project cxf by apache.

the class InheritImpl method getObject.

public ObjectInfo getObject(int type) {
    ObjectInfo info = new ObjectInfo();
    info.setType("Type: " + type);
    BaseType ba = null;
    switch(type) {
        case 0:
            ba = new SubTypeA();
            ba.setName("A");
            ((SubTypeA) ba).setAvalue("A");
            break;
        case 1:
            ba = new SubTypeB();
            ba.setName("B");
            ((SubTypeB) ba).setBvalue("B");
            break;
        default:
    }
    info.setBaseObject(ba);
    return info;
}
Also used : BaseType(org.apache.cxf.tests.inherit.objects.BaseType) SubTypeB(org.apache.cxf.tests.inherit.objects.SubTypeB) SubTypeA(org.apache.cxf.tests.inherit.objects.SubTypeA) ObjectInfo(org.apache.cxf.tests.inherit.types.ObjectInfo)

Aggregations

BaseType (org.apache.cxf.tests.inherit.objects.BaseType)1 SubTypeA (org.apache.cxf.tests.inherit.objects.SubTypeA)1 SubTypeB (org.apache.cxf.tests.inherit.objects.SubTypeB)1 ObjectInfo (org.apache.cxf.tests.inherit.types.ObjectInfo)1