|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| PolicyEntry.java | 25% | 25% | 33.3% | 26.7% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* Copyright (C) The Spice Group. All rights reserved.
|
|
| 3 |
*
|
|
| 4 |
* This software is published under the terms of the Spice
|
|
| 5 |
* Software License version 1.1, a copy of which has been included
|
|
| 6 |
* with this distribution in the LICENSE.txt file.
|
|
| 7 |
*/
|
|
| 8 |
package org.codehaus.spice.xmlpolicy.runtime;
|
|
| 9 |
|
|
| 10 |
import java.security.CodeSource;
|
|
| 11 |
import java.security.Permissions;
|
|
| 12 |
|
|
| 13 |
/**
|
|
| 14 |
* Internal Policy Entry holder class.
|
|
| 15 |
* Holds information about an entry in policy file.
|
|
| 16 |
*/
|
|
| 17 |
final class PolicyEntry
|
|
| 18 |
{
|
|
| 19 |
/**
|
|
| 20 |
* The code source that entry is about.
|
|
| 21 |
*/
|
|
| 22 |
private final CodeSource m_codeSource;
|
|
| 23 |
|
|
| 24 |
/**
|
|
| 25 |
* the set of permissions for code source.
|
|
| 26 |
*/
|
|
| 27 |
private final Permissions m_permissions;
|
|
| 28 |
|
|
| 29 | 1 |
public PolicyEntry( final CodeSource codeSource,
|
| 30 |
final Permissions permissions ) |
|
| 31 |
{
|
|
| 32 | 1 |
if( null == codeSource ) |
| 33 |
{
|
|
| 34 | 1 |
throw new NullPointerException( "codeSource" ); |
| 35 |
} |
|
| 36 | 0 |
if( null == permissions ) |
| 37 |
{
|
|
| 38 | 0 |
throw new NullPointerException( "permissions" ); |
| 39 |
} |
|
| 40 |
|
|
| 41 | 0 |
m_codeSource = codeSource; |
| 42 | 0 |
m_permissions = permissions; |
| 43 |
} |
|
| 44 |
|
|
| 45 | 0 |
public CodeSource getCodeSource()
|
| 46 |
{
|
|
| 47 | 0 |
return m_codeSource;
|
| 48 |
} |
|
| 49 |
|
|
| 50 | 0 |
public Permissions getPermissions()
|
| 51 |
{
|
|
| 52 | 0 |
return m_permissions;
|
| 53 |
} |
|
| 54 |
} |
|
| 55 |
|
|
||||||||||