acl/src/main/java/org/springframework/security/acls/domain/DefaultPermissionFactory.java
protected void registerPublicPermissions(Class<? extends Permission> clazz) {
		Assert.notNull(clazz, "Class required");

		Field[] fields = clazz.getFields();

		for (Field field : fields) {
			try {
				Object fieldValue = field.get(null);

				if (Permission.class.isAssignableFrom(fieldValue.getClass())) {
					// Found a Permission static field
					Permission perm = (Permission) fieldValue;
					String permissionName = field.getName();

					registerPermission(perm, permissionName);
				}
			}
			catch (Exception ignore) {
			}
		}
	}
protected void registerPublicPermissions(Class<? extends Permission> clazz) {
		Assert.notNull(clazz, "Class required");

		Field[] fields = clazz.getFields();

		for (Field field : fields) {
			try {
				Object fieldValue = field.get(null);

				if (Permission.class.isAssignableFrom(fieldValue.getClass())) {
					// Found a Permission static field
					Permission perm = (Permission) fieldValue;
					String permissionName = field.getName();

					registerPermission(perm, permissionName);
				}
			}
			catch (Exception ignore) {
			}
		}
	}
protected void registerPublicPermissions ( Class < ? extends Permission > clazz ) { Assert . notNull ( clazz , "Class required" ) ; Field [ ] fields = clazz . getFields ( ) ; for ( Field field : fields ) { try { Object fieldValue = field . get ( null ) ; if ( Permission . class . isAssignableFrom ( fieldValue . getClass ( ) ) ) { // Found a Permission static field Permission perm = ( Permission ) fieldValue ; String permissionName = field . getName ( ) ; registerPermission ( perm , permissionName ) ; } } catch ( Exception ignore ) { } } }
Registers the public static fields of type {@link Permission} for a give class.
<p>
These permissions will be registered under the name of the field. See
{@link BasePermission} for an example.

@param clazz a {@link Permission} class with public static fields to register
Registers the public static fields of type { @link Permission } for a give class . <p > These permissions will be registered under the name of the field . See { @link BasePermission } for an example .