/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param list this is the list of annotations on the method */ private void process(Method method, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param label this is the annotation applied to the method * @param list this is the list of annotations on the method */ private void process(Method method, Annotation label, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, label, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This method is used to extend the provided class. Extending a * class in this way basically means that the fields that have * been scanned in the specific class will be added to this. Doing * this improves the performance of classes within a hierarchy. * * @param base the class to inherit scanned fields from * @param access this is the access type used for the super type */ private void extend(Class base, DefaultType access) throws Exception { ContactList list = support.getMethods(base, access); for(Contact contact : list) { process((MethodContact)contact); } }
/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param label this is the annotation applied to the method * @param list this is the list of annotations on the method */ private void process(Method method, Annotation label, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, label, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param list this is the list of annotations on the method */ private void process(Method method, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This method is used to extend the provided class. Extending a * class in this way basically means that the fields that have * been scanned in the specific class will be added to this. Doing * this improves the performance of classes within a hierarchy. * * @param base the class to inherit scanned fields from * @param access this is the access type used for the super type */ private void extend(Class base, DefaultType access) throws Exception { ContactList list = support.getMethods(base, access); for(Contact contact : list) { process((MethodContact)contact); } }
/** * This method is used to extend the provided class. Extending a * class in this way basically means that the fields that have * been scanned in the specific class will be added to this. Doing * this improves the performance of classes within a hierarchy. * * @param base the class to inherit scanned fields from * @param access this is the access type used for the super type */ private void extend(Class base, DefaultType access) throws Exception { ContactList list = support.getMethods(base, access); for(Contact contact : list) { process((MethodContact)contact); } }
/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param label this is the annotation applied to the method * @param list this is the list of annotations on the method */ private void process(Method method, Annotation label, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, label, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param list this is the list of annotations on the method */ private void process(Method method, Annotation[] list) throws Exception { MethodPart part = factory.getInstance(method, list); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } }
/** * This is used to scan all the methods of the class in order to * determine if it should have a default annotation. If the method * should have a default XML annotation then it is added to the * list of contacts to be used to form the class schema. * * @param detail this is the detail to have its methods scanned * @param access this is the default access type for the class */ private void extract(Detail detail, DefaultType access) throws Exception { List<MethodDetail> methods = detail.getMethods(); if(access == PROPERTY) { for(MethodDetail entry : methods) { Annotation[] list = entry.getAnnotations(); Method method = entry.getMethod(); Class value = factory.getType(method); if(value != null) { process(method, list); } } } }
/** * This is used to scan all the methods of the class in order to * determine if it should have a default annotation. If the method * should have a default XML annotation then it is added to the * list of contacts to be used to form the class schema. * * @param detail this is the detail to have its methods scanned * @param access this is the default access type for the class */ private void extract(Detail detail, DefaultType access) throws Exception { List<MethodDetail> methods = detail.getMethods(); if(access == PROPERTY) { for(MethodDetail entry : methods) { Annotation[] list = entry.getAnnotations(); Method method = entry.getMethod(); Class value = factory.getType(method); if(value != null) { process(method, list); } } } }
/** * This is used to scan all the methods of the class in order to * determine if it should have a default annotation. If the method * should have a default XML annotation then it is added to the * list of contacts to be used to form the class schema. * * @param detail this is the detail to have its methods scanned * @param access this is the default access type for the class */ private void extract(Detail detail, DefaultType access) throws Exception { List<MethodDetail> methods = detail.getMethods(); if(access == PROPERTY) { for(MethodDetail entry : methods) { Annotation[] list = entry.getAnnotations(); Method method = entry.getMethod(); Class value = factory.getType(method); if(value != null) { process(method, list); } } } }