eu.bootstrep.Utilities
Class Platform

java.lang.Object
  extended by eu.bootstrep.Utilities.Platform

public class Platform
extends java.lang.Object

This class contains some methods to retrieve information about the platform, the loading software runs on.
Some of class methods are System methods.


Field Summary
(package private)  java.lang.String osName
           
(package private)  java.lang.String osSeparator
           
(package private)  java.lang.String osUserDir
           
 
Constructor Summary
Platform()
          Creates a new instance of Platform
This constructor retrieves the operating system, the file separator and the user directory.
Platform(java.lang.String myPlat)
          Creates a new instance of Platform of type myPlat.
 
Method Summary
private  java.lang.String getOs()
          This method retrieves the current operating system
 java.lang.String getOsName()
          get the value for the parameter osName
 java.lang.String getOsSeparator()
          get the value for the parameter osSeparator
 java.lang.String getOsUserDir()
          get the value for the parameter osUserDir
 java.lang.String getSeparator()
          This method retrieves the correct separator for the platform
private  java.lang.String getUserDir()
          This method retrieves the current user working dir, e.g.
 void setOsName(java.lang.String osName)
          set the value for the parameter osName
 void setOsSeparator(java.lang.String osSeparator)
          set the value for the parameter osSeparator
 void setOsUserDir(java.lang.String osUserDir)
          set the value for the parameter osUserDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

osName

java.lang.String osName

osSeparator

java.lang.String osSeparator

osUserDir

java.lang.String osUserDir
Constructor Detail

Platform

public Platform()
Creates a new instance of Platform
This constructor retrieves the operating system, the file separator and the user directory.
User directory is the folder, user have installed the software on.


Platform

public Platform(java.lang.String myPlat)
Creates a new instance of Platform of type myPlat.
Use this constructor if you know the platform your project runs on.

Parameters:
myPlat - A string representing the platform name: es Linux, WinXP
Method Detail

getOs

private java.lang.String getOs()
This method retrieves the current operating system

Returns:
The value of the current Operating System

getUserDir

private java.lang.String getUserDir()
This method retrieves the current user working dir, e.g. the project directory

Returns:
The value of the current working directory

getOsName

public java.lang.String getOsName()
get the value for the parameter osName

Returns:
the osName

setOsName

public void setOsName(java.lang.String osName)
set the value for the parameter osName

Parameters:
osName - the osName to set

getOsSeparator

public java.lang.String getOsSeparator()
get the value for the parameter osSeparator

Returns:
the osSeparator

setOsSeparator

public void setOsSeparator(java.lang.String osSeparator)
set the value for the parameter osSeparator

Parameters:
osSeparator - the osSeparator to set

getOsUserDir

public java.lang.String getOsUserDir()
get the value for the parameter osUserDir

Returns:
the osUserDir

setOsUserDir

public void setOsUserDir(java.lang.String osUserDir)
set the value for the parameter osUserDir

Parameters:
osUserDir - the osUserDir to set

getSeparator

public java.lang.String getSeparator()
This method retrieves the correct separator for the platform

Returns:
The value of the correct separator