Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kasource.commons.reflection.filter.constructors;
 
Filter constructors by modifiers,

Note: It's not recommended to use this class directly, instead use the org.kasource.commons.reflection.ConstructorFilterBuilder.

Author(s):
rikardwi
public class ModifierConstructorFilter implements ConstructorFilter {
    private int modifier;
    
    public ModifierConstructorFilter(int modifier) {
        this. = modifier;
    }
    
    @SuppressWarnings("rawtypes")
    @Override
    public boolean passFilter(Constructor constructor) {
       return (constructor.getModifiers() & ) > 0;
       
    }
New to GrepCode? Check out our FAQ X