List of usage examples for java.util PropertyPermission getName
public final String getName()
From source file:Main.java
public static void main(String[] args) { PropertyPermission permission = new PropertyPermission("java.home.*", "read,write"); if ("java.home.usr".matches(permission.getName())) { String actions = permission.getActions(); if (actions.contains("read")) { System.out.println("Has permissions on java.home.usr for read"); }//from ww w.j a v a 2s. c o m if (actions.contains("write")) { System.out.println("Has permissions on java.home.usr for write"); } } }