public static CPUArch getCPUArch ( String javaCPU ) { final CPUArch javaArch ; final String javaCPUArch = javaCPU != null ? javaCPU . toLowerCase ( ) : "" ; // first parse the java arch if ( javaCPUArch . startsWith ( "x86_64" ) || javaCPUArch . startsWith ( "amd64" ) || javaCPUArch . startsWith ( "ia64" ) ) { javaArch = CPUArch . X86_64 ; } else if ( javaCPUArch . startsWith ( "ppc64" ) || javaCPUArch . startsWith ( "powerpc64" ) ) { javaArch = CPUArch . PPC64 ; } else if ( javaCPUArch . startsWith ( "ppc" ) || javaCPUArch . startsWith ( "powerpc" ) ) { javaArch = CPUArch . PPC ; } else if ( javaCPUArch . contains ( "86" ) ) { javaArch = CPUArch . X86 ; } else { javaArch = CPUArch . UNKNOWN ; } return javaArch ; }
Get the CPU architecture based on the passed in javaCPUArch specifier .