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, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..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.String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.String
assemblyShortName
Assembly name: mscorlibstatic java.lang.String
className
Qualified class name: System.Environmentstatic JCType
classType
The 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 Environment
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoEnvironment
, a cast assert is made to check if types are compatible.static void
Exit(int exitCode)
static java.lang.String
ExpandEnvironmentVariables(java.lang.String name)
static void
FailFast(java.lang.String message)
static void
FailFast(java.lang.String message, NetException exception)
static java.lang.String
getCommandLine()
static java.lang.String[]
GetCommandLineArgs()
static java.lang.String
getCurrentDirectory()
static int
getCurrentManagedThreadId()
static java.lang.String
GetEnvironmentVariable(java.lang.String variable)
static java.lang.String
GetEnvironmentVariable(java.lang.String variable, EnvironmentVariableTarget target)
static IDictionary
GetEnvironmentVariables()
static IDictionary
GetEnvironmentVariables(EnvironmentVariableTarget target)
static int
getExitCode()
static boolean
getHasShutdownStarted()
static boolean
getIs64BitOperatingSystem()
static boolean
getIs64BitProcess()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typestatic java.lang.String[]
GetLogicalDrives()
static java.lang.String
getMachineName()
static java.lang.String
getNewLine()
static OperatingSystem
getOSVersion()
static int
getProcessorCount()
static java.lang.String
getStackTrace()
static java.lang.String
getSystemDirectory()
static int
getSystemPageSize()
static int
getTickCount()
static java.lang.String
getUserDomainName()
static boolean
getUserInteractive()
static java.lang.String
getUserName()
static Version
getVersion()
static long
getWorkingSet()
static void
setCurrentDirectory(java.lang.String CurrentDirectory)
static void
SetEnvironmentVariable(java.lang.String variable, java.lang.String value)
static void
SetEnvironmentVariable(java.lang.String variable, java.lang.String value, EnvironmentVariableTarget target)
static void
setExitCode(int ExitCode)
void
setJCOInstance(JCObject instance)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.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 java.lang.String assemblyShortName
Assembly name: mscorlib- 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:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static Environment cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoEnvironment
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
Environment
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
GetEnvironmentVariables
public static IDictionary GetEnvironmentVariables() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, FormatException, OutOfMemoryException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
GetEnvironmentVariables
public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, FormatException, InvalidOperationException, OutOfMemoryException, IndexOutOfRangeException, NullReferenceException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
ArgumentNullException
ArgumentException
FormatException
InvalidOperationException
OutOfMemoryException
IndexOutOfRangeException
NullReferenceException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
SecurityException
UnauthorizedAccessException
IOException
-
ExpandEnvironmentVariables
public static java.lang.String ExpandEnvironmentVariables(java.lang.String name) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
GetEnvironmentVariable
public static java.lang.String GetEnvironmentVariable(java.lang.String variable) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
GetEnvironmentVariable
public static java.lang.String GetEnvironmentVariable(java.lang.String variable, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, NullReferenceException, ArgumentOutOfRangeException, NotSupportedException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
FormatException
ArgumentException
IndexOutOfRangeException
NullReferenceException
ArgumentOutOfRangeException
NotSupportedException
CultureNotFoundException
InvalidOperationException
ObjectDisposedException
SecurityException
UnauthorizedAccessException
IOException
-
GetCommandLineArgs
public static java.lang.String[] GetCommandLineArgs() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
GetLogicalDrives
public static java.lang.String[] GetLogicalDrives() throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
-
Exit
public static void Exit(int exitCode) 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
-
FailFast
public static void FailFast(java.lang.String message, NetException exception) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
ArgumentOutOfRangeException
OutOfMemoryException
FormatException
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, OutOfMemoryException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, NotSupportedException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
ArgumentOutOfRangeException
OutOfMemoryException
IndexOutOfRangeException
CultureNotFoundException
InvalidOperationException
ObjectDisposedException
SecurityException
UnauthorizedAccessException
NotSupportedException
IOException
-
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
-
getUserInteractive
public static boolean getUserInteractive() throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.Throwable
ArgumentNullException
-
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
-
getProcessorCount
public static int getProcessorCount() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getSystemPageSize
public static int getSystemPageSize() throws java.lang.Throwable, ArgumentException
- Throws:
java.lang.Throwable
ArgumentException
-
getTickCount
public static int getTickCount() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getWorkingSet
public static long getWorkingSet() throws java.lang.Throwable, ArgumentException
- Throws:
java.lang.Throwable
ArgumentException
-
getOSVersion
public static OperatingSystem getOSVersion() throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, MissingMethodException, TargetInvocationException, CultureNotFoundException, OutOfMemoryException, FormatException
-
getCommandLine
public static java.lang.String getCommandLine() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
getCurrentDirectory
public static java.lang.String getCurrentDirectory() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ObjectDisposedException, OutOfMemoryException, NotSupportedException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ObjectDisposedException
OutOfMemoryException
NotSupportedException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
PathTooLongException
DriveNotFoundException
OperationCanceledException
IndexOutOfRangeException
-
setCurrentDirectory
public static void setCurrentDirectory(java.lang.String CurrentDirectory) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FormatException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException
-
getMachineName
public static java.lang.String getMachineName() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException, InvalidOperationException
-
getNewLine
public static java.lang.String getNewLine() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getStackTrace
public static java.lang.String getStackTrace() throws java.lang.Throwable, ArgumentException, ArgumentNullException, SecurityException, TypeLoadException, NotSupportedException, InvalidOperationException, MissingMethodException, TargetInvocationException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException
-
getSystemDirectory
public static java.lang.String getSystemDirectory() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
-
getUserDomainName
public static java.lang.String getUserDomainName() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException, InvalidOperationException
-
getUserName
public static java.lang.String getUserName() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
-
getVersion
public static Version getVersion() throws java.lang.Throwable, ArgumentOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
-
-