private void stepAlong() { while (++currentindex < methods.length) { if (methods[currentindex].canGet()) break; //if (methodtype == SAXAccessMethodSpec.SET_METHOD && methods[currentindex].setmethod != null) break; } } public boolean valid() {
private void appendDeclaredFields(CharWrap cw, Class clazz) { MethodAnalyser methodAnalyser = mappingcontext.getAnalyser(clazz); // Append all "legitimate" public read/write fields declared in this class // to the parseSpec. for (int i = 0; i < methodAnalyser.allgetters.length; ++i) { SAXAccessMethod method = methodAnalyser.allgetters[i]; if (method.canGet() && method.canSet() && mappingcontext.generalLeafParser.isLeafType(method.getAccessedType()) && method.getDeclaringClass() == methodAnalyser.targetclass && !method.tagname.equals("anchorField")) { cw.append("," + method.tagname); } } }
if (!canGet()) { throw new UniversalRuntimeException( "No GET scheme supplied for mapped default tag");
for (int i = 0; i < ma.allgetters.length; ++i) { SAXAccessMethod sam = ma.allgetters[i]; if (!sam.canGet() || !sam.canSet()) continue; if (exceptions != null && ArrayUtil.contains(exceptions, sam.tagname))
if (am != null && am.canGet() && !am.isenumonly && (am.ismultiple || !leafparser.isLeafType(am.clazz)) && !am.isexactsetter) {
for (int i = 0; i < ma.allgetters.length; ++i) { SAXAccessMethod sam = ma.allgetters[i]; if (!sam.canGet() || !sam.canSet()) continue; if (sam.tagname.equals("parent")) {
/** * Takes a path ending with a greedy expression (probably .*) and appends the * "leaves" (fields) based on passed in arguments */ private void appendLeaves(Class rootclass, String pathroot, String attrprefix, StringList attnames, StringList paths) { String[] components = PathUtil.splitPath(pathroot); Class moveclass = rootclass; for (int i = 0; i < components.length; ++i) { MethodAnalyser ma = mappingcontext.getAnalyser(moveclass); String component = components[i]; AccessMethod method = ma.getAccessMethod(component); if (method == null || !(method.canGet() && method.canSet())) { throw new IllegalArgumentException( "Unable to find writeable property for path component " + component + " at " + moveclass); } moveclass = method.getAccessedType(); } MethodAnalyser ma = mappingcontext.getAnalyser(moveclass); for (int i = 0; i < ma.allgetters.length; ++i) { SAXAccessMethod method = ma.allgetters[i]; if (method.canGet() && method.canSet() && mappingcontext.generalLeafParser.isLeafType(method.getAccessedType())) { paths.add(PathUtil.composePathEncoded(pathroot, method.tagname)); attnames.add(attrprefix + method.tagname); } } }