/** * Given an object to be serialised/deserialised, return a MethodAnalyser * object containing a hash of Method and Field accessors. The * <code>context</code> stores a hash of these analysers so they are only * ever computed once per context per object class analysed. * * @param objclass Either an object instance to be investigated, or an object class. * If a class is specified and no analyser is registered, a new * object will be created using newInstance() to be queried. * @param context the context * @return a MethodAnalyser */ public static MethodAnalyser constructMethodAnalyser(Class objclass, SAXalizerMappingContext context) { SAXalizerMapperEntry entry = context.mapper.byClass(objclass); try { MethodAnalyser togo = new MethodAnalyser(objclass, entry, context); return togo; } catch (Exception e) { throw UniversalRuntimeException.accumulate(e, "Error constructing method analyser for " + objclass); } }