Java examples for Reflection:Modifier
set Protected Modifier
//package com.java2s; import java.lang.reflect.Modifier; public class Main { public static int setProtected(int modifier) { return modifier & (~Modifier.PUBLIC) & (~Modifier.PRIVATE) | (Modifier.PROTECTED); }//from w w w .j a v a 2 s.co m }