lundi 26 décembre 2016

How to cide a checkStyle method in Java?

Our teacher asked us to make a method which takes a Class as a parameter then checks the fields and methods if they follow the rules of Checkstyle (Upper case, lower case, final attribute, etc.)

He gave us a piece of code to start with but I don't know what to do next.

public class CheckStyle {
    static String  valider(Class c){
        Field[] tattribut = c.getDeclaredFields();
        String name = c.getName();
        Method[] tmethod=c.getDeclaredMethods();
    }   

    public static void main(String[] args) {
        String error = CheckStyle.valider(a.class);
        System.out.println(error);
    }
}





Aucun commentaire:

Enregistrer un commentaire