int superOffset = 0;
if(_class == com.sun.star.uno.XInterface.class) { // take special care for xinterface
MethodDescription queryInterface = new MethodDescription("queryInterface", 0, TypeInfo.ANY);
queryInterface.init(new Class[]{Type.class}, new ParameterTypeInfo[]{new ParameterTypeInfo(null, "queryInterface", 0, 0)},
Object.class);
MethodDescription acquire = new MethodDescription("acquire", 1, TypeInfo.ONEWAY);
acquire.init(new Class[0], null, Void.class);
MethodDescription release = new MethodDescription("release", 2, TypeInfo.ONEWAY);
release.init(new Class[0], null, Void.class);
methodDescriptionsByName.put("queryInterface", queryInterface);
methodDescriptionsByName.put("acquire", acquire);
methodDescriptionsByName.put("release", release);
_offset = 3;
}
else {
if(_superType != null) // do we have a supertype (we don't have one, if we are not derived of XInterface)
superOffset = _superType._offset;
TypeInfo typeInfos[] = __getTypeInfos(_class);
Method methods[] = _class.getMethods();
for(int i = 0; i < methods.length; ++ i) {
Class parameters[] = methods[i].getParameterTypes();
ParameterTypeInfo parameterTypeInfos[] = new ParameterTypeInfo[parameters.length];
MethodTypeInfo methodTypeInfo = __findMethodTypeInfo(typeInfos, methods[i].getName());
MethodDescription methodDescription = null;
if(methodTypeInfo != null) { // this is a idl method
methodDescription = new MethodDescription(methodTypeInfo);
for(int j = 0; j < parameters.length; ++ j)
parameterTypeInfos[j] = __findParameterTypeInfo(typeInfos, methods[i].getName(), j);
}
else {
AttributeTypeInfo attributeTypeInfo = __findAttributeTypeInfo(typeInfos, methods[i].getName().substring(3));
if(attributeTypeInfo != null) {
if(methods[i].getName().substring(0, 3).equals("get")) // is the current a get method?
methodDescription = new MethodDescription(methods[i].getName(), attributeTypeInfo.getIndex(), attributeTypeInfo.getFlags());
else {
methodDescription = new MethodDescription(methods[i].getName(), attributeTypeInfo.getIndex() + 1, 0);
parameterTypeInfos = new ParameterTypeInfo[]{new ParameterTypeInfo("", methods[i].getName(), 0, attributeTypeInfo.getFlags())};
}
}
}
if(methodDescription != null) {