Methods Summary |
---|
public abstract void | add(java.security.Permission permission)Adds the specified {@code Permission} to this collection.
|
public abstract java.util.Enumeration | elements()Returns an enumeration over all {@link Permission}s encapsulated by this
{@code PermissionCollection}.
|
public abstract boolean | implies(java.security.Permission permission)Indicates whether the specified permission is implied by this {@code
PermissionCollection}.
|
public boolean | isReadOnly()Indicates whether new permissions can be added to this {@code
PermissionCollection}. // = false;
return readOnly;
|
public void | setReadOnly()Marks this {@code PermissionCollection} as read only, so that no new
permissions can be added to it.
readOnly = true;
|
public java.lang.String | toString()Returns a string containing a concise, human-readable description of this
{@code PermissionCollection}.
List elist = new ArrayList(100);
Enumeration elenum = elements();
String superStr = super.toString();
int totalLength = superStr.length() + 5;
if (elenum != null) {
while (elenum.hasMoreElements()) {
String el = elenum.nextElement().toString();
totalLength += el.length();
elist.add(el);
}
}
int esize = elist.size();
totalLength += esize * 4;
//FIXME StringBuffer --> StringBuilder
StringBuffer result = new StringBuffer(totalLength).append(superStr)
.append(" ("); //$NON-NLS-1$
for (int i = 0; i < esize; i++) {
result.append("\n ").append(elist.get(i).toString()); //$NON-NLS-1$
}
return result.append("\n)").toString(); //$NON-NLS-1$
|