Package org.robovm.compiler.target
Interface Target
- All Known Implementing Classes:
AbstractTarget,ConsoleTarget,FrameworkTarget,IOSTarget
public interface Target
Builds and launches (if supported) a particular type of binary (e.g. iOS
apps, dynamic libraries, etc).
-
Method Summary
Modifier and Type Method Description voidarchive()Creates an archive suitable for distribution and stores it in theConfig.getInstallDir()directory.Filebuild(List<File> objectFiles)Builds a binary out of the specified object files.voidbuildFat(Map<Arch,File> slices)Builds a fat binary out of the specified slices.booleancanLaunch()Returnstrueif binaries created by thisTargetcan be launched, i.e.booleancanLaunchInPlace()Returnstrueif binaries created by thisTargetcan be launched in place and doesn't have to be copied into some folder structure, e.g.LaunchParameterscreateLaunchParameters()CreatesLaunchParametersfor launching the binary built by thisTarget.ArchgetArch()List<Arch>getDefaultArchs()Returns a list of the default archs to build for if no archs have been specified in theConfig.StringgetInstallRelativeArchivePath(Path path)OSgetOs()StringgetType()Returns a unique type id for thisTarget.voidinit(Config config)voidinstall()Installs the built binary and any supporting files into theConfig.getInstallDir()directory.Processlaunch(LaunchParameters launchParameters)Launches the built binary if supported.voidprepareLaunch()performs prepare launch activities
-
Method Details
-
getType
String getType()Returns a unique type id for thisTarget. -
getOs
OS getOs()Returns theOSthisTargetwill build for. This is determined byinit(Config). If an explicitOShas been set on theConfigin the call toinit(Config)thatOSwill returned by this method. Otherwiseinit(Config)will determine a defaultOSand this method returns that one. -
getArch
Arch getArch()Returns theArchthisTargetwill build for. This is determined byinit(Config). If an explicitArchhas been set on theConfigin the call toinit(Config)thatArchwill returned by this method. Otherwiseinit(Config)will determine a defaultArchand this method returns that one. -
getDefaultArchs
Returns a list of the default archs to build for if no archs have been specified in theConfig. Returns an empty list if there are no defaults. -
getInstallRelativeArchivePath
-
canLaunch
boolean canLaunch()Returnstrueif binaries created by thisTargetcan be launched, i.e. it produces executable binaries. -
canLaunchInPlace
boolean canLaunchInPlace()Returnstrueif binaries created by thisTargetcan be launched in place and doesn't have to be copied into some folder structure, e.g. an iOS app bundle. -
prepareLaunch
performs prepare launch activities- Throws:
IOException
-
build
Builds a binary out of the specified object files.- Throws:
IOException
-
buildFat
Builds a fat binary out of the specified slices.- Throws:
IOException
-
install
Installs the built binary and any supporting files into theConfig.getInstallDir()directory.- Throws:
IOException
-
archive
Creates an archive suitable for distribution and stores it in theConfig.getInstallDir()directory.- Throws:
IOException
-
launch
Launches the built binary if supported.- Throws:
UnsupportedOperationException- if binaries built by thisTargetcannot be launched.IOException
-
createLaunchParameters
LaunchParameters createLaunchParameters()CreatesLaunchParametersfor launching the binary built by thisTarget.- Throws:
UnsupportedOperationException- if binaries built by thisTargetcannot be launched.
-
init
-