TypeInfo voidType = PrimitiveInfo.VOID;
ClassInfo anotherBean = (ClassInfo) factory.getTypeInfo(AnotherBean.class);
return new MethodInfoImpl(null, "someMethod", voidType, MethodInfo.NO_PARAMS, MethodInfo.NO_EXCEPTIONS, ModifierInfo.PUBLIC, anotherBean);
}