public class PalioSecurity
extends java.lang.Object
Constructor and Description |
---|
PalioSecurity() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
canExecuteJavaByteCode(java.io.File javaBytecode,
Instance.InstanceType instanceType)
This method checks if compiled java bytecode does not contain references to restricted classes.
|
static boolean |
canReferenceToClass(java.lang.String name,
Instance.InstanceType instanceType)
This method is called by:
- groovy engine during compilation,
- java blocks after compilation (
canExecuteJavaCode ). |
static void |
checkAccess(Instance.InstanceType required)
This method should be called from each API (package palio.api) method.
|
public static void checkAccess(Instance.InstanceType required)
required
- accessjava.lang.SecurityException
- if no access grantedpublic static boolean canReferenceToClass(java.lang.String name, Instance.InstanceType instanceType)
canExecuteJavaCode
).public static java.util.List<java.lang.String> canExecuteJavaByteCode(java.io.File javaBytecode, Instance.InstanceType instanceType) throws java.io.IOException
canReferenceToClass
for every seen reference.java.io.IOException