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=9.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.String
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.String
assemblyShortName
Assembly name: System.Private.CoreLibstatic 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()
static boolean
getIsPrivilegedProcess()
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
getProcessId()
static int
getProcessorCount()
static java.lang.String
getProcessPath()
static java.lang.String
getStackTrace()
static java.lang.String
getSystemDirectory()
static int
getSystemPageSize()
static int
getTickCount()
static long
getTickCount64()
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: System.Private.CoreLib, Version=9.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: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, PlatformNotSupportedException, OutOfMemoryException, IndexOutOfRangeException, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, FormatException, NotSupportedException, InvalidOperationException
-
GetEnvironmentVariables
public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) throws java.lang.Throwable, PlatformNotSupportedException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, InvalidOperationException, MissingMethodException, TargetInvocationException, ObjectDisposedException, SecurityException, ArgumentNullException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, UnauthorizedAccessException, IOException, FormatException
- Throws:
java.lang.Throwable
PlatformNotSupportedException
OutOfMemoryException
ArgumentOutOfRangeException
ArgumentException
NotSupportedException
InvalidOperationException
MissingMethodException
TargetInvocationException
ObjectDisposedException
SecurityException
ArgumentNullException
IndexOutOfRangeException
RankException
ArrayTypeMismatchException
UnauthorizedAccessException
IOException
FormatException
-
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.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
FormatException
OutOfMemoryException
-
GetEnvironmentVariable
public static java.lang.String GetEnvironmentVariable(java.lang.String variable, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ObjectDisposedException, SecurityException, IOException, ArrayTypeMismatchException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
MissingMethodException
TargetInvocationException
PlatformNotSupportedException
ObjectDisposedException
SecurityException
IOException
ArrayTypeMismatchException
IndexOutOfRangeException
-
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, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, ArgumentNullException, PlatformNotSupportedException
-
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, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
PlatformNotSupportedException
-
FailFast
public static void FailFast(java.lang.String message) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
PlatformNotSupportedException
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value, EnvironmentVariableTarget target) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, ArrayTypeMismatchException, InvalidOperationException, FormatException, OutOfMemoryException, MissingMethodException, TargetInvocationException, ObjectDisposedException, SecurityException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentOutOfRangeException
ArrayTypeMismatchException
InvalidOperationException
FormatException
OutOfMemoryException
MissingMethodException
TargetInvocationException
ObjectDisposedException
SecurityException
UnauthorizedAccessException
IOException
-
SetEnvironmentVariable
public static void SetEnvironmentVariable(java.lang.String variable, java.lang.String value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, 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, PlatformNotSupportedException, NotSupportedException, ArgumentException, MissingMethodException, TargetInvocationException, ObjectDisposedException, FormatException, InvalidOperationException, OutOfMemoryException
-
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, NotSupportedException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, InvalidCastException, ApplicationException
-
getCurrentDirectory
public static java.lang.String getCurrentDirectory() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, OutOfMemoryException, CultureNotFoundException, NullReferenceException, ExternalException, ArgumentNullException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
IndexOutOfRangeException
FormatException
OutOfMemoryException
CultureNotFoundException
NullReferenceException
ExternalException
ArgumentNullException
-
setCurrentDirectory
public static void setCurrentDirectory(java.lang.String CurrentDirectory) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, FormatException, OutOfMemoryException
-
getMachineName
public static java.lang.String getMachineName() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
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, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, OutOfMemoryException, NullReferenceException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
IndexOutOfRangeException
FormatException
OutOfMemoryException
NullReferenceException
-
getStackTrace
public static java.lang.String getStackTrace() throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException, TypeLoadException, ArgumentException, FileLoadException, NotSupportedException, MissingMethodException, TargetInvocationException, NullReferenceException, CultureNotFoundException, ArgumentOutOfRangeException, ArrayTypeMismatchException, OutOfMemoryException, FormatException, RankException, IndexOutOfRangeException, InvalidOperationException
- Throws:
java.lang.Throwable
PlatformNotSupportedException
ArgumentNullException
TypeLoadException
ArgumentException
FileLoadException
NotSupportedException
MissingMethodException
TargetInvocationException
NullReferenceException
CultureNotFoundException
ArgumentOutOfRangeException
ArrayTypeMismatchException
OutOfMemoryException
FormatException
RankException
IndexOutOfRangeException
InvalidOperationException
-
getSystemDirectory
public static java.lang.String getSystemDirectory() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
FormatException
OutOfMemoryException
-
getUserDomainName
public static java.lang.String getUserDomainName() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
getUserName
public static java.lang.String getUserName() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
getVersion
public static Version getVersion() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
-