com.atlassian.plugin.osgi.factory
Enum AutowireStrategy

java.lang.Object
  extended by java.lang.Enum<AutowireStrategy>
      extended by com.atlassian.plugin.osgi.factory.AutowireStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AutowireStrategy>

public enum AutowireStrategy
extends java.lang.Enum<AutowireStrategy>

How to autowire a component


Enum Constant Summary
AUTOWIRE_AUTODETECT
          Autodetects appropriate injection by first seeing if any no-arg constructors exist.
AUTOWIRE_BY_CONSTRUCTOR
          Performs construction-based injection by type
AUTOWIRE_BY_NAME
          Performs setter-based injection by name
AUTOWIRE_BY_TYPE
          Performs setter-based injection by type
AUTOWIRE_NO
          Performs no autowiring
 
Method Summary
static AutowireStrategy fromIndex(int index)
           
 int getIndex()
           
static AutowireStrategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AutowireStrategy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTOWIRE_NO

public static final AutowireStrategy AUTOWIRE_NO
Performs no autowiring


AUTOWIRE_BY_NAME

public static final AutowireStrategy AUTOWIRE_BY_NAME
Performs setter-based injection by name


AUTOWIRE_BY_TYPE

public static final AutowireStrategy AUTOWIRE_BY_TYPE
Performs setter-based injection by type


AUTOWIRE_BY_CONSTRUCTOR

public static final AutowireStrategy AUTOWIRE_BY_CONSTRUCTOR
Performs construction-based injection by type


AUTOWIRE_AUTODETECT

public static final AutowireStrategy AUTOWIRE_AUTODETECT
Autodetects appropriate injection by first seeing if any no-arg constructors exist. If not, performs constructor injection, and if so, autowires by type then name

Method Detail

values

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

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

valueOf

public static AutowireStrategy valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getIndex

public int getIndex()

fromIndex

public static AutowireStrategy fromIndex(int index)


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.