public class Contract extends NetObject
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Diagnostics.Contracts.Contract
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Diagnostics.Contracts.Contract
|
static org.mases.jcobridge.JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
Contract() |
Contract(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
Assert(boolean condition) |
static void |
Assert(boolean condition,
java.lang.String userMessage) |
static void |
Assume(boolean condition) |
static void |
Assume(boolean condition,
java.lang.String userMessage) |
static Contract |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into Contract, a cast assert is made to check if types are compatible. |
static void |
EndContractBlock() |
static void |
Ensures(boolean condition) |
static void |
Ensures(boolean condition,
java.lang.String userMessage) |
static <TException extends IJCOBridgeReflected> |
EnsuresOnThrow(boolean condition) |
static <TException extends IJCOBridgeReflected> |
EnsuresOnThrow(boolean condition,
java.lang.String userMessage) |
static <T extends IJCOBridgeReflected> |
Exists(IEnumerable_1 collection,
Predicate_1 predicate) |
static boolean |
Exists(int fromInclusive,
int toExclusive,
Predicate_1 predicate) |
static <T extends IJCOBridgeReflected> |
ForAll(IEnumerable_1 collection,
Predicate_1 predicate) |
static boolean |
ForAll(int fromInclusive,
int toExclusive,
Predicate_1 predicate) |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
org.mases.jcobridge.JCType |
getJCOType()
Returns the instantiated class Type
|
static void |
Invariant(boolean condition) |
static void |
Invariant(boolean condition,
java.lang.String userMessage) |
static void |
Requires(boolean condition) |
static void |
Requires(boolean condition,
java.lang.String userMessage) |
void |
setJCOInstance(org.mases.jcobridge.JCObject instance) |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public static org.mases.jcobridge.JCType classType
JCTypepublic Contract()
throws java.lang.Throwable
java.lang.Throwablepublic Contract(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic static void Assert(boolean condition)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
OutOfMemoryException,
ContractException,
IndexOutOfRangeException,
FormatException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionContractExceptionIndexOutOfRangeExceptionFormatExceptionpublic static void Assert(boolean condition,
java.lang.String userMessage)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
OutOfMemoryException,
ContractException,
IndexOutOfRangeException,
FormatException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionContractExceptionIndexOutOfRangeExceptionFormatExceptionpublic static void Assume(boolean condition)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
OutOfMemoryException,
ContractException,
IndexOutOfRangeException,
FormatException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionContractExceptionIndexOutOfRangeExceptionFormatExceptionpublic static void Assume(boolean condition,
java.lang.String userMessage)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
OutOfMemoryException,
ContractException,
IndexOutOfRangeException,
FormatException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionContractExceptionIndexOutOfRangeExceptionFormatExceptionpublic static Contract cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into Contract, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedContract instancejava.lang.Throwable - in case of error during cast operationpublic static void EndContractBlock()
throws java.lang.Throwable
java.lang.Throwablepublic static void Ensures(boolean condition)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static void Ensures(boolean condition,
java.lang.String userMessage)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static <TException extends IJCOBridgeReflected> void EnsuresOnThrow(boolean condition) throws java.lang.Throwable, PlatformNotSupportedException, NullReferenceException, ArgumentException, NotSupportedException, CultureNotFoundException, IndexOutOfRangeException, ArgumentOutOfRangeException, FormatException, ContractException, OutOfMemoryException, InvalidOperationException, ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static <TException extends IJCOBridgeReflected> void EnsuresOnThrow(boolean condition, java.lang.String userMessage) throws java.lang.Throwable, PlatformNotSupportedException, NullReferenceException, ArgumentException, NotSupportedException, CultureNotFoundException, IndexOutOfRangeException, ArgumentOutOfRangeException, FormatException, ContractException, OutOfMemoryException, InvalidOperationException, ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static <T extends IJCOBridgeReflected> boolean Exists(IEnumerable_1 collection, Predicate_1 predicate) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static boolean Exists(int fromInclusive,
int toExclusive,
Predicate_1 predicate)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
RankException,
CultureNotFoundException,
ObjectDisposedException
public static <T extends IJCOBridgeReflected> boolean ForAll(IEnumerable_1 collection, Predicate_1 predicate) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static boolean ForAll(int fromInclusive,
int toExclusive,
Predicate_1 predicate)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
RankException,
CultureNotFoundException,
ObjectDisposedException
public java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic org.mases.jcobridge.JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic static void Invariant(boolean condition)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static void Invariant(boolean condition,
java.lang.String userMessage)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static void Requires(boolean condition)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic static void Requires(boolean condition,
java.lang.String userMessage)
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
ArgumentException,
NotSupportedException,
CultureNotFoundException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
FormatException,
ContractException,
OutOfMemoryException,
InvalidOperationException,
ArgumentNullException
java.lang.ThrowablePlatformNotSupportedExceptionNullReferenceExceptionArgumentExceptionNotSupportedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionContractExceptionOutOfMemoryExceptionInvalidOperationExceptionArgumentNullExceptionpublic void setJCOInstance(org.mases.jcobridge.JCObject instance)
setJCOInstance in class NetObject