Package system.security
Class PermissionSet
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- org.mases.jcobridge.netreflection.NetObjectEnumerable
-
- system.security.PermissionSet
-
- All Implemented Interfaces:
Iterable<NetObject>
,IEnumerable
,IJCOBridgeReflected
,IDeserializationCallback
- Direct Known Subclasses:
NamedPermissionSet
,ReadOnlyPermissionSet
public class PermissionSet extends NetObjectEnumerable implements IDeserializationCallback
The base .NET class managing System.Security.PermissionSet, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.See: https://docs.microsoft.com/en-us/dotnet/api/System.Security.PermissionSet
-
-
Field Summary
Fields Modifier and Type Field Description static String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static String
assemblyShortName
Assembly name: mscorlibstatic String
className
Qualified class name: System.Security.PermissionSetstatic JCType
classType
The type managed from JCOBridge.-
Fields inherited from class org.mases.jcobridge.netreflection.NetObjectEnumerable
Null
-
-
Constructor Summary
Constructors Constructor Description PermissionSet()
PermissionSet(Object instance)
Internal constructor.PermissionSet(PermissionState state)
PermissionSet(PermissionSet permSet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IPermission
AddPermission(IPermission perm)
void
Assert()
static PermissionSet
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoPermissionSet
, a cast assert is made to check if types are compatible.boolean
ContainsNonCodeAccessPermissions()
static byte[]
ConvertPermissionSet(String inFormat, byte[] inData, String outFormat)
static byte[]
ConvertPermissionSet(String dupParam0, JCORefOut dupParam1, String dupParam2)
PermissionSet
Copy()
void
CopyTo(Array array, int index)
void
Demand()
void
Deny()
void
FromXml(SecurityElement et)
int
getCount()
boolean
getIsReadOnly()
boolean
getIsSynchronized()
String
getJCOAssemblyName()
Returns the reflected Assembly nameString
getJCOClassName()
Returns the reflected Class nameObject
getJCOInstance()
Returns the instantiated classString
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeIPermission
GetPermission(NetType permClass)
NetObject
getSyncRoot()
PermissionSet
Intersect(PermissionSet other)
boolean
IsEmpty()
boolean
IsSubsetOf(PermissionSet target)
boolean
IsUnrestricted()
void
OnDeserialization(NetObject sender)
Deprecated.Not for public use because the method is implemented in .NET with an explicit interface.void
PermitOnly()
IPermission
RemovePermission(NetType permClass)
static void
RevertAssert()
void
setJCOInstance(JCObject instance)
IPermission
SetPermission(IPermission perm)
SecurityElement
ToXml()
PermissionSet
Union(PermissionSet other)
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObjectEnumerable
GetEnumerator, iterator
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toObjectFromArray, toObjectFromArray, toString, ToString, translateException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
assemblyFullName
public static final String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final String className
Qualified class name: System.Security.PermissionSet- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PermissionSet
public PermissionSet(Object instance) throws Throwable
Internal constructor. Use with caution- Throws:
Throwable
-
PermissionSet
public PermissionSet(PermissionState state) throws Throwable, ArgumentException
- Throws:
Throwable
ArgumentException
-
PermissionSet
public PermissionSet(PermissionSet permSet) throws Throwable
- Throws:
Throwable
-
-
Method Detail
-
getJCOAssemblyName
public String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIDeserializationCallback
- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObjectEnumerable
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIDeserializationCallback
- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObjectEnumerable
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIDeserializationCallback
- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObjectEnumerable
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIDeserializationCallback
- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObjectEnumerable
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObjectEnumerable
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIDeserializationCallback
- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObjectEnumerable
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static PermissionSet cast(IJCOBridgeReflected from) throws Throwable
Try to cast theIJCOBridgeReflected
instance intoPermissionSet
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
PermissionSet
instance- Throws:
Throwable
- in case of error during cast operation
-
ContainsNonCodeAccessPermissions
public boolean ContainsNonCodeAccessPermissions() throws Throwable, ArgumentException, ArgumentOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, NullReferenceException, FormatException, SecurityException, MissingMethodException, TargetInvocationException
-
IsEmpty
public boolean IsEmpty() throws Throwable, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, NullReferenceException, FormatException, SecurityException, MissingMethodException, TargetInvocationException
-
IsSubsetOf
public boolean IsSubsetOf(PermissionSet target) throws Throwable, ArgumentOutOfRangeException, NotSupportedException, ArgumentNullException, NullReferenceException, ArgumentException, SecurityException, InvalidOperationException
-
ConvertPermissionSet
public static byte[] ConvertPermissionSet(String inFormat, byte[] inData, String outFormat) throws Throwable, NotImplementedException
- Throws:
Throwable
NotImplementedException
-
ConvertPermissionSet
public static byte[] ConvertPermissionSet(String dupParam0, JCORefOut dupParam1, String dupParam2) throws Throwable, NotImplementedException
- Throws:
Throwable
NotImplementedException
-
AddPermission
public IPermission AddPermission(IPermission perm) throws Throwable, ArgumentException, NotSupportedException, ArgumentNullException, ObjectDisposedException, AbandonedMutexException, CultureNotFoundException, ArgumentOutOfRangeException, InvalidOperationException, FormatException, SecurityException, MissingMethodException, TargetInvocationException, NullReferenceException
- Throws:
Throwable
ArgumentException
NotSupportedException
ArgumentNullException
ObjectDisposedException
AbandonedMutexException
CultureNotFoundException
ArgumentOutOfRangeException
InvalidOperationException
FormatException
SecurityException
MissingMethodException
TargetInvocationException
NullReferenceException
-
GetPermission
public IPermission GetPermission(NetType permClass) throws Throwable, ArgumentException, SecurityException, ArgumentNullException, NotImplementedException, NotSupportedException, InvalidOperationException, MissingMethodException, MemberAccessException, TargetException, TargetParameterCountException, FormatException, ObjectDisposedException, AbandonedMutexException
- Throws:
Throwable
ArgumentException
SecurityException
ArgumentNullException
NotImplementedException
NotSupportedException
InvalidOperationException
MissingMethodException
MemberAccessException
TargetException
TargetParameterCountException
FormatException
ObjectDisposedException
AbandonedMutexException
-
RemovePermission
public IPermission RemovePermission(NetType permClass) throws Throwable, ArgumentException, SecurityException, ArgumentNullException, NotImplementedException, NotSupportedException, InvalidOperationException, MissingMethodException, MemberAccessException, TargetException, TargetParameterCountException, FormatException, ObjectDisposedException, AbandonedMutexException
- Throws:
Throwable
ArgumentException
SecurityException
ArgumentNullException
NotImplementedException
NotSupportedException
InvalidOperationException
MissingMethodException
MemberAccessException
TargetException
TargetParameterCountException
FormatException
ObjectDisposedException
AbandonedMutexException
-
SetPermission
public IPermission SetPermission(IPermission perm) throws Throwable, ArgumentException, NotSupportedException, ArgumentNullException, ObjectDisposedException, AbandonedMutexException, CultureNotFoundException, ArgumentOutOfRangeException, NullReferenceException, FormatException, SecurityException, InvalidOperationException, MissingMethodException
-
Copy
public PermissionSet Copy() throws Throwable
- Throws:
Throwable
-
Intersect
public PermissionSet Intersect(PermissionSet other) throws Throwable, ArgumentNullException, TypeLoadException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, NullReferenceException, SecurityException
- Throws:
Throwable
ArgumentNullException
TypeLoadException
ArgumentException
InvalidOperationException
MissingMethodException
TargetInvocationException
NotSupportedException
CultureNotFoundException
ArgumentOutOfRangeException
OutOfMemoryException
FormatException
NullReferenceException
SecurityException
-
Union
public PermissionSet Union(PermissionSet other) throws Throwable, ArgumentNullException, TypeLoadException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, NullReferenceException, SecurityException
- Throws:
Throwable
ArgumentNullException
TypeLoadException
ArgumentException
InvalidOperationException
MissingMethodException
TargetInvocationException
NotSupportedException
CultureNotFoundException
ArgumentOutOfRangeException
OutOfMemoryException
FormatException
NullReferenceException
SecurityException
-
ToXml
public SecurityElement ToXml() throws Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, NotSupportedException, NullReferenceException, SecurityException
-
Assert
public void Assert() throws Throwable, SecurityException
- Throws:
Throwable
SecurityException
-
CopyTo
public void CopyTo(Array array, int index) throws Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, NotSupportedException, ObjectDisposedException, InvalidOperationException, NullReferenceException, FormatException, SecurityException, MissingMethodException, TargetInvocationException
-
Demand
public void Demand() throws Throwable, ArgumentException, ArgumentOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, NullReferenceException, FormatException, SecurityException, MissingMethodException
-
Deny
public void Deny() throws Throwable, InvalidOperationException, NotSupportedException, SecurityException
-
FromXml
public void FromXml(SecurityElement et) throws Throwable, ArgumentNullException, NullReferenceException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, ArgumentException, CultureNotFoundException, TypeLoadException, InvalidOperationException, SecurityException, NotImplementedException, NotSupportedException, MemberAccessException, TargetException, TargetParameterCountException, MissingMethodException, TargetInvocationException
- Throws:
Throwable
ArgumentNullException
NullReferenceException
ArgumentOutOfRangeException
OutOfMemoryException
FormatException
ArgumentException
CultureNotFoundException
TypeLoadException
InvalidOperationException
SecurityException
NotImplementedException
NotSupportedException
MemberAccessException
TargetException
TargetParameterCountException
MissingMethodException
TargetInvocationException
-
PermitOnly
public void PermitOnly() throws Throwable, SecurityException
- Throws:
Throwable
SecurityException
-
RevertAssert
public static void RevertAssert() throws Throwable, InvalidOperationException
- Throws:
Throwable
InvalidOperationException
-
OnDeserialization
@Deprecated public void OnDeserialization(NetObject sender) throws Throwable
Deprecated.Not for public use because the method is implemented in .NET with an explicit interface. Use the static ToIDeserializationCallback method available in IDeserializationCallback to obtain an object with an invocable method- Specified by:
OnDeserialization
in interfaceIDeserializationCallback
- Throws:
Throwable
-
-