eu.lindenbaum.maven
Enum PackagingType

java.lang.Object
  extended by java.lang.Enum<PackagingType>
      extended by eu.lindenbaum.maven.PackagingType
All Implemented Interfaces:
Serializable, Comparable<PackagingType>

public enum PackagingType
extends Enum<PackagingType>

Enum for the supported packaging types.

Author:
Tobias Schlager , Olle Törnström

Enum Constant Summary
ERLANG_OTP
          Packaging type for Erlang/OTP applications with maven standard directory layout:
ERLANG_REL
          Packaging type for Erlang/OTP releases with trivial directory layout:
ERLANG_STD
          Packaging type for Erlang/OTP applications with Erlang/OTP standard directory layout:
UNSUPPORTED
          Packaging is unsupported meaning it is most certain not an Erlang/OTP packaging type at all.
 
Method Summary
static PackagingType fromString(String id)
          Returns a PackagingType for a packaging id.
 boolean isA(String id)
          Compares a specific id with this types id.
static PackagingType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PackagingType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ERLANG_OTP

public static final PackagingType ERLANG_OTP
Packaging type for Erlang/OTP applications with maven standard directory layout:
  BASE
    +-- src/changes (changes.xml)
    +-- src/main/erlang ([ARTIFACTID].app, [ARTIFACTID].appup, *.erl, private *.hrl)
    +-- src/main/include (*.hrl)
    +-- src/main/priv (*)
    +-- src/site (overview.edoc)
    +-- src/test/include (*.hrl)
    +-- src/test/erlang (*.erl)
    +-- src/test/priv (*)
    +-- target (build artifacts)
    +-- pom.xml
 


ERLANG_STD

public static final PackagingType ERLANG_STD
Packaging type for Erlang/OTP applications with Erlang/OTP standard directory layout:
  BASE
    +-- doc (overview.edoc)
    +-- ebin ([ARTIFACTID].app, [ARTIFACTID].appup)
    +-- include (*.hrl)
    +-- priv (*)
    +-- src (*.erl, private *.hrl)
    +-- test_include (*.hrl)
    +-- test_priv (*)
    +-- test_src (*.erl)
    +-- test (*.erl)
    +-- target (build artifacts)
    +-- pom.xml
 


ERLANG_REL

public static final PackagingType ERLANG_REL
Packaging type for Erlang/OTP releases with trivial directory layout:
  BASE
    +-- target (build artifacts)
    +-- pom.xml
    +-- [ARTIFACTID].rel
    +-- relup
    +-- sys.config
 


UNSUPPORTED

public static final PackagingType UNSUPPORTED
Packaging is unsupported meaning it is most certain not an Erlang/OTP packaging type at all.

Since:
2.0.0
Method Detail

values

public static PackagingType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PackagingType c : PackagingType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PackagingType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isA

public boolean isA(String id)
Compares a specific id with this types id.

Parameters:
id - to compare to this enums id
Returns:
true if the ids match, false otherwise

fromString

public static PackagingType fromString(String id)
Returns a PackagingType for a packaging id. If the string does not match a specific enum type an UNSUPPORTED is returned.

Parameters:
id - used to instantiate a PackagingType
Returns:
the matching packaging type


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.