All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.report.rules.pmd.GenericsNaming.html Maven / Gradle / Ivy



GenericsNaming

GenericsNaming

Names for references to generic values should be limited to a single uppercase letter.

                    
//TypeDeclaration/ClassOrInterfaceDeclaration/TypeParameters/TypeParameter[
  string-length(@Image) > 1 
  or
  string:upper-case(@Image) != @Image
]

Example(s):

            
public interface GenericDao<E extends BaseModel, K extends Serializable> extends BaseDao {
   // This is ok...
}

public interface GenericDao<E extends BaseModel, K extends Serializable> {
   // Also this
}

public interface GenericDao<e extends BaseModel, K extends Serializable> {
   // 'e' should be an 'E'
}

public interface GenericDao<EF extends BaseModel, K extends Serializable> {
   // 'EF' is not ok.
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy