List of usage examples for java.util PropertyPermission implies
@Override public boolean implies(Permission p)
From source file:Main.java
public static void main(String[] args) { PropertyPermission permission = new PropertyPermission("java.*", "read,write"); if (permission.implies(new PropertyPermission("java.home", "read"))) { System.out.println("Has permissions on " + "java.home" + " for read"); }/*from w w w . j ava 2 s . c o m*/ // Check permission on read action if (permission.implies(new PropertyPermission("java.home", "write"))) { System.out.println("Has permissions on " + "java.home" + " for write"); } }