org.eclipse.mtj.core.project
Enum ProjectType
java.lang.Object
java.lang.Enum<
ProjectType>
org.eclipse.mtj.core.project.ProjectType
-
All Implemented Interfaces:
-
Serializable,
Comparable<
ProjectType>
-
public enum ProjectType
- extends
Enum<
ProjectType>
This enum represents the types of
IMTJProject
's provided by MTJ.
At the moment, MTJ only provides one implementation of
IMTJProject
,
the
IMidletSuiteProject
project type.
Clients must use this enum in some
MTJCore
methods to retrieve
resources associated with an specific type of project, for example, an
IMetaData
that is accessible via the
MTJCore.createMetaData(IProject, ProjectType)
method.
CLients must use the
fromProject(IProject)
method to try identify
from which type of MTJProjet a IProject belongs.
EXPERIMENTAL. This class or interface has been added as part
of a work in progress. There is no guarantee that this API will work or that
it will remain the same. Please do not use this API without consulting with
the MTJ team.
-
Since:
- 1.0
Method Summary
|
static
ProjectType
|
fromProject
(IProject project)
Return the project type of the given project. |
static
ProjectType
|
valueOf
(
String name)
Returns the enum constant of this type with the specified name. |
static
ProjectType[]
|
values
()
Returns an array containing the constants of this enum type, in
the order they are declared. |
MIDLET_SUITE
public static final
ProjectType MIDLET_SUITE
- Represents a
IMidletSuiteProject
type of project.
UNKNOWN
public static final
ProjectType UNKNOWN
- Represents an unknown type of project
values
public static
ProjectType[] 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 (ProjectType c : ProjectType.values())
System.out.println(c);
-
-
Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static
ProjectType 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
fromProject
public static
ProjectType fromProject(IProject project)
- Return the project type of the given project.
-
-
Parameters:
-
project
- the project from which we try to define it's type.
-
Returns:
- the project type or
UNKNOWN
if the type could not be
defined.