Package system
Class Environment
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.Environment
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class Environment extends NetObject
The base .NET class managing System.Environment, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Environment
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.StringassemblyShortNameAssembly name: System.Private.CoreLibstatic java.lang.StringclassNameQualified class name: System.Environmentstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description Environment()Environment(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Environmentcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoEnvironment, a cast assert is made to check if types are compatible.static voidExit(int exitCode)static java.lang.StringExpandEnvironmentVariables(java.lang.String name)static voidFailFast(java.lang.String message)static voidFailFast(java.lang.String message, NetException exception)static java.lang.StringgetCommandLine()static java.lang.String[]GetCommandLineArgs()static java.lang.StringgetCurrentDirectory()static intgetCurrentManagedThreadId()static java.lang.StringGetEnvironmentVariable(java.lang.String variable)static java.lang.StringGetEnvironmentVariable(java.lang.String variable, EnvironmentVariableTarget target)static IDictionaryGetEnvironmentVariables()static IDictionaryGetEnvironmentVariables(EnvironmentVariableTarget target)static intgetExitCode()static booleangetHasShutdownStarted()static booleangetIs64BitOperatingSystem()static booleangetIs64BitProcess()static booleangetIsPrivilegedProcess()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class Typestatic java.lang.String[]GetLogicalDrives()static java.lang.StringgetMachineName()static java.lang.StringgetNewLine()static OperatingSystemgetOSVersion()static intgetProcessId()static intgetProcessorCount()static java.lang.StringgetProcessPath()static java.lang.StringgetStackTrace()static java.lang.StringgetSystemDirectory()static intgetSystemPageSize()static intgetTickCount()static longgetTickCount64()static java.lang.StringgetUserDomainName()static booleangetUserInteractive()static java.lang.StringgetUserName()static VersiongetVersion()static longgetWorkingSet()static voidsetCurrentDirectory(java.lang.String CurrentDirectory)static voidSetEnvironmentVariable(java.lang.String variable, java.lang.String value)static voidSetEnvironmentVariable(java.lang.String variable, java.lang.String value, EnvironmentVariableTarget target)static voidsetExitCode(int ExitCode)voidsetJCOInstance(JCObject instance)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Environment- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static Environment cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoEnvironment, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
Environmentinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
GetEnvironmentVariables
public static IDictionary GetEnvironmentVariables() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, OutOfMemoryException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, FormatException
-
GetEnvironmentVariables
public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) throws java.lang.Throwable, PlatformNotSupportedException, OutOfMemoryException, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, IndexOutOfRangeException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, IOException, FormatException, RankException, ArrayTypeMismatchException
- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionOutOfMemoryExceptionArgumentNullExceptionArgumentOutOfRangeExceptionArgumentExceptionInvalidOperationExceptionIndexOutOfRangeExceptionNotSupportedExceptionMethodAccessExceptionMissingMethodExceptionMemberAccessExceptionTargetInvocationExceptionObjectDisposedExceptionSecurityExceptionUnauthorizedAccessExceptionIOExceptionFormatExceptionRankExceptionArrayTypeMismatchException
-
ExpandEnvironmentVariables
public static java.lang.String ExpandEnvironmentVariables(java.lang.String name) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, OutOfMemoryException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryException
-
GetEnvironmentVariable
public static java.lang.String GetEnvironmentVariable(java.lang.String variable, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, SecurityException, IOException, ArrayTypeMismatchException, IndexOutOfRangeException- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionPlatformNotSupportedExceptionMethodAccessExceptionMissingMethodExceptionMemberAccessExceptionTargetInvocationExceptionObjectDisposedExceptionSecurityExceptionIOExceptionArrayTypeMismatchExceptionIndexOutOfRangeException
-
GetEnvironmentVariable
public static java.lang.String GetEnvironmentVariable(java.lang.String variable) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
GetCommandLineArgs
public static java.lang.String[] GetCommandLineArgs() throws java.lang.Throwable, NotSupportedException, ArgumentException, InvalidOperationException, ArgumentNullException, PlatformNotSupportedException, FormatException, IndexOutOfRangeException, RankException, ArgumentOutOfRangeException, ArrayTypeMismatchException
-
GetLogicalDrives
public static java.lang.String[] GetLogicalDrives() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, OutOfMemoryException
-
Exit
public static void Exit(int exitCode) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
FailFast
public static void FailFast(java.lang.String message, NetException exception) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
FailFast
public static void FailFast(java.lang.String message) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArrayTypeMismatchException, FormatException, OutOfMemoryException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, IOException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionIndexOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArrayTypeMismatchExceptionFormatExceptionOutOfMemoryExceptionMethodAccessExceptionMissingMethodExceptionMemberAccessExceptionTargetInvocationExceptionObjectDisposedExceptionSecurityExceptionUnauthorizedAccessExceptionIOException
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException
-
getHasShutdownStarted
public static boolean getHasShutdownStarted() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getIs64BitOperatingSystem
public static boolean getIs64BitOperatingSystem() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getIs64BitProcess
public static boolean getIs64BitProcess() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getIsPrivilegedProcess
public static boolean getIsPrivilegedProcess() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, IndexOutOfRangeException, FormatException, OutOfMemoryException- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionMethodAccessExceptionMissingMethodExceptionMemberAccessExceptionTargetInvocationExceptionObjectDisposedExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryException
-
getUserInteractive
public static boolean getUserInteractive() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getCurrentManagedThreadId
public static int getCurrentManagedThreadId() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getExitCode
public static int getExitCode() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setExitCode
public static void setExitCode(int ExitCode) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getProcessId
public static int getProcessId() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getProcessorCount
public static int getProcessorCount() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getSystemPageSize
public static int getSystemPageSize() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getTickCount
public static int getTickCount() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getTickCount64
public static long getTickCount64() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getWorkingSet
public static long getWorkingSet() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getOSVersion
public static OperatingSystem getOSVersion() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
-
getCommandLine
public static java.lang.String getCommandLine() throws java.lang.Throwable, InvalidOperationException, ArgumentNullException, PlatformNotSupportedException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, ApplicationException
-
getCurrentDirectory
public static java.lang.String getCurrentDirectory() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, OutOfMemoryException, PlatformNotSupportedException, CultureNotFoundException, ExternalException, ArgumentNullException
-
setCurrentDirectory
public static void setCurrentDirectory(java.lang.String CurrentDirectory) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, FormatException, OutOfMemoryException
-
getMachineName
public static java.lang.String getMachineName() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeException
-
getNewLine
public static java.lang.String getNewLine() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getProcessPath
public static java.lang.String getProcessPath() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, OutOfMemoryException, PlatformNotSupportedException
-
getStackTrace
public static java.lang.String getStackTrace() throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException, TypeLoadException, ArgumentException, NotSupportedException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, CultureNotFoundException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, OutOfMemoryException, FormatException, RankException, IndexOutOfRangeException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionArgumentNullExceptionTypeLoadExceptionArgumentExceptionNotSupportedExceptionMethodAccessExceptionMissingMethodExceptionMemberAccessExceptionTargetInvocationExceptionCultureNotFoundExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionOutOfMemoryExceptionFormatExceptionRankExceptionIndexOutOfRangeException
-
getSystemDirectory
public static java.lang.String getSystemDirectory() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, OutOfMemoryException
-
getUserDomainName
public static java.lang.String getUserDomainName() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
getUserName
public static java.lang.String getUserName() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
getVersion
public static Version getVersion() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, AmbiguousMatchException, InvalidOperationException, NotSupportedException, IndexOutOfRangeException, FormatException, OverflowException, ArgumentOutOfRangeException
-
-