congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Platforms
Code IndexAdd Tabnine to your IDE (free)

How to use
Platforms
in
com.izforge.izpack.util

Best Java code snippets using com.izforge.izpack.util.Platforms (Showing top 17 results out of 315)

origin: org.codehaus.izpack/izpack-core

  /**
   * Provides the current platform.
   *
   * @param platforms the platform factory
   * @return the current platform
   */
  public Platform provide(Platforms platforms)
  {
    return platforms.getCurrentPlatform();
  }
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the platform given the operating system name, architecture and version.
 *
 * @param name        the operating system name or symbolic name
 * @param arch        the operating system architecture, or symbolic architecture
 * @param version     the operating system version. May be {@code null}
 * @param javaVersion the java version
 * @return the corresponding platform
 */
public Platform getPlatform(String name, String arch, String version, String javaVersion)
{
  Platform result;
  Name pname = getName(name);
  Arch parch = getArch(arch);
  Platform match = findMatch(name, pname, parch, version);
  result = getPlatform(match, parch, version, javaVersion);
  return result;
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Compares two strings for equality.
 *
 * @param a the first string to compare. May be {@code null}
 * @param b the second string to compare. May be {@code null}
 * @return <tt>true</tt> if the strings match
 */
private boolean equals(String a, String b)
{
  return equals(a, b, false);
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the platform family name for the current operating system.
 * This may query the underlying OS to determine the platform name.
 *
 * @return the corresponding platform family name
 */
protected Name getCurrentOSName(String name)
{
  Name result = getName(name);
  if (result == Name.LINUX)
  {
    result = getLinuxName();
  }
  return result;
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the current platform given the operating system name, architecture and version.
 * <p/>
 * This may query the underlying OS to determine the platform name.
 *
 * @param name        the operating system name
 * @param arch        the operating system architecture, or symbolic architecture
 * @param version     the operating system version. May be {@code null}
 * @param javaVersion the java version. May be {@code null}
 * @return the corresponding platform
 */
public Platform getCurrentPlatform(String name, String arch, String version, String javaVersion)
{
  Platform result;
  Name pname = getCurrentOSName(name);
  Arch parch = getArch(arch);
  Platform match = findMatch(name, pname, parch, version);
  result = getPlatform(match, parch, version, javaVersion);
  return result;
}
origin: org.codehaus.izpack/izpack-test-common

if (runOn != null)
  Platform platform = new Platforms().getCurrentPlatform();
  boolean found = false;
  for (Platform.Name name : runOn.value())
origin: org.codehaus.izpack/izpack-tools

String path = getReleasePath();
if (path != null)
  List<String> text = getText(path);
  if (text != null)
    if (search(text, OsVersionConstants.REDHAT) || search(text, OsVersionConstants.RED_HAT))
    else if (search(text, OsVersionConstants.FEDORA))
    else if (search(text, OsVersionConstants.MANDRAKE))
    else if (search(text, OsVersionConstants.MANDRIVA))
    else if (search(text, OsVersionConstants.SUSE, true))
  List<String> text = getText(OsVersionConstants.PROC_VERSION);
  if (text != null)
    if (search(text, OsVersionConstants.DEBIAN))
    else if (search(text, OsVersionConstants.UBUNTU))
  if (result == Name.LINUX && exists("/etc/debian_version"))
origin: org.codehaus.izpack/izpack-util

Platform.Arch arch = platforms.getArch(model.getArch());
match = arch.equals(platform.getArch());
Platform.Name name = platforms.getName(model.getName());
match = name.equals(platform.getName());
Platform.Name family = platforms.getName(model.getFamily());
match = platform.getName().isA(family);
origin: stackoverflow.com

 Platforms [] mainPlats;

void setup() {
 size(750, 400);

 mainPlats = new Platforms[3];
 mainPlats[0] = new Platforms(200, 200, 100, 15);
 mainPlats[1] = new Platforms(420, 300, 100, 15);
 mainPlats[2] = new Platforms(570, 350, 100, 15);
}

void draw() {
 level();
}


void level() {
 mainPlats[0].displayPlat();
 mainPlats[0].platMove();
 mainPlats[0].platTransition();

 mainPlats[1].displayPlat();
 mainPlats[1].platMove();
 mainPlats[1].platTransition();

 mainPlats[2].displayPlat();
 mainPlats[2].platMove();
 mainPlats[2].platTransition();
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the platform given the operating system name, architecture and version.
 *
 * @param name    the operating system name or symbolic name
 * @param arch    the operating system architecture, or symbolic architecture
 * @param version the operating system version. May be {@code null}
 * @return the corresponding platform
 */
public Platform getPlatform(String name, String arch, String version)
{
  return getPlatform(name, arch, version, null);
}
origin: org.codehaus.izpack/izpack-installer

Platforms platforms = new Platforms();
Platform platform = platforms.getCurrentPlatform();
TargetFactory factory = new TargetFactory(new DefaultTargetPlatformFactory(dummy, platform, platforms));
Librarian librarian = new Librarian(factory, new Housekeeper());
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the platform for the specified operating system name and architecture.
 *
 * @param name the operating system name or symbolic name
 * @param arch the operating system architecture, or symbolic architecture
 * @return the corresponding platform
 */
public Platform getPlatform(String name, String arch)
{
  return getPlatform(name, arch, null);
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the platform for the specified operating system name and architecture.
 * <p/>
 * This may query the underlying OS to determine the platform name.
 *
 * @param name the operating system name
 * @param arch the operating system architecture, or symbolic architecture
 * @return the corresponding platform
 */
public Platform getCurrentPlatform(String name, String arch)
{
  return getCurrentPlatform(name, arch, null);
}
origin: org.codehaus.izpack/izpack-util

Platform platform = platforms.getPlatform(name, arch);
if (platform.getName() == Platform.Name.UNKNOWN)
origin: org.codehaus.izpack/izpack-tools

for (Platform platform : PLATFORMS)
  if ((pname == Name.UNKNOWN && equals(name, platform.getSymbolicName(), true))
      || (pname != Name.UNKNOWN && pname == platform.getName()))
    boolean archMatch = arch == platform.getArch();
    boolean optArchMatch = platform.getArch() == Arch.UNKNOWN;
    boolean versionMatch = version != null && equals(version, platform.getVersion());
    boolean optVersionMatch = platform.getVersion() == null;
    boolean symbolicMatch = equals(name, platform.getSymbolicName(), true);
    if (archMatch)
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the current platform given the operating system name, architecture and version.
 * <p/>
 * This may query the underlying OS to determine the platform name.
 *
 * @param name    the operating system name
 * @param arch    the operating system architecture, or symbolic architecture
 * @param version the operating system version. May be {@code null}
 * @return the corresponding platform
 */
public Platform getCurrentPlatform(String name, String arch, String version)
{
  return getCurrentPlatform(name, arch, version, null);
}
origin: org.codehaus.izpack/izpack-tools

/**
 * Returns the current platform.
 * <p/>
 * This may query the underlying OS to determine the platform name.
 *
 * @return the current platform
 */
public Platform getCurrentPlatform()
{
  return getCurrentPlatform(System.getProperty(OsVersionConstants.OSNAME),
               System.getProperty(OsVersionConstants.OSARCH),
               System.getProperty(OsVersionConstants.OSVERSION),
               System.getProperty("java.version"));
}
com.izforge.izpack.utilPlatforms

Javadoc

Factory for Platform instances.

Most used methods

  • getCurrentPlatform
    Returns the current platform given the operating system name, architecture and version. This may que
  • <init>
  • getArch
    Returns the platform family name given the operating system or symbolic name.
  • getName
    Returns the platform family name for the specified operating system name.
  • getPlatform
    Returns the platform given the operating system name, architecture and version.
  • equals
    Compares two strings for equality.
  • exists
    Determines if the specified path exists.
  • findMatch
    Attempts to find a platform that matches the platform name, architecture and version.
  • getCurrentOSName
    Returns the platform family name for the current operating system. This may query the underlying OS
  • getLinuxName
    Returns the Linux platform family name.
  • getReleasePath
    Returns the release info file path, for Linux distributions.
  • getText
    Returns the text from the specified file.
  • getReleasePath,
  • getText,
  • search

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now