001    /*
002     * Copyright (C) 2014 XStream Committers.
003     * All rights reserved.
004     *
005     * Created on 08. January 2014 by Joerg Schaible
006     */
007    package com.thoughtworks.xstream.security;
008    
009    /**
010     * Definition of a type permission. 
011     * 
012     * @author Jörg Schaible
013     * @since 1.4.7
014     */
015    public interface TypePermission {
016        /**
017         * Check permission for a provided type.
018         * 
019         * @param type the type to check
020         * @return <code>true</code> if provided type is allowed, <code>false</code> if permission does not handle the type
021         * @throws ForbiddenClassException if provided type is explicitly forbidden
022         * @since 1.4.7
023         */
024        boolean allows(Class type);
025    }