com.feilong.lib.xstream.security.TypeHierarchyPermission Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of feilong Show documentation
Show all versions of feilong Show documentation
feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.
/*
* Copyright (C) 2014 XStream Committers.
* All rights reserved.
*
* Created on 23. January 2014 by Joerg Schaible
*/
package com.feilong.lib.xstream.security;
/**
* Permission for a type hierarchy with a name matching one in the provided list.
*
* @author Jörg Schaible
* @since 1.4.7
*/
public class TypeHierarchyPermission implements TypePermission{
private Class type;
/**
* @since 1.4.7
*/
public TypeHierarchyPermission(Class type){
this.type = type;
}
@Override
public boolean allows(Class type){
if (type == null){
return false;
}
return this.type.isAssignableFrom(type);
}
}