com.feilong.lib.xstream.security.NoTypePermission 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 08. January 2014 by Joerg Schaible
*/
package com.feilong.lib.xstream.security;
/**
* No permission for any type.
*
* Can be used to skip any existing default permission.
*
*
* @author Jörg Schaible
* @since 1.4.7
*/
public class NoTypePermission implements TypePermission{
/**
* @since 1.4.7
*/
public static final TypePermission NONE = new NoTypePermission();
@Override
public boolean allows(Class type){
throw new ForbiddenClassException(type);
}
@Override
public int hashCode(){
return 1;
}
@Override
public boolean equals(Object obj){
return obj != null && obj.getClass() == NoTypePermission.class;
}
}