protected void initializePermission ( ) { try { List < MatchingPart > parts = Lists . newArrayList ( ) ; for ( String partString : split ( _permission ) ) { partString = partString . trim ( ) ; checkArgument ( ! "" . equals ( partString ) , "Permission cannot contain empty parts" ) ; MatchingPart part = toPart ( Collections . unmodifiableList ( parts ) , partString ) ; parts . add ( part ) ; } _parts = ImmutableList . copyOf ( parts ) ; } catch ( InvalidPermissionStringException e ) { throw e ; } catch ( Exception e ) { // Rethrow any uncaught exception as being caused by an invalid permission string throw new InvalidPermissionStringException ( e . getMessage ( ) , _permission ) ; } }
Parses and initializes the permission s parts . By default this is performed by the constructor . If a subclass needs to perform its own initialization prior to initializing the permissions then it should call the constructor with the initialization parameter set to false and then call this method when ready .