Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.config.java.naming
Class MethodNameStrategy

    java.lang.Object
      org.springframework.config.java.naming.MethodNameStrategy

All Implemented Interfaces:
  BeanNamingStrategy

    public class MethodNameStrategy

extends java.lang.Object
implements BeanNamingStrategy

Naming strategy which uses the method name for generating the bean name. Allows configuration for include the owning class short name or FQN as well.

Author:
  Costin Leau, Chris Beams

Nested Class Summary
`static class` | `MethodNameStrategy.Prefix` Naming prefix.

Constructor Summary
`MethodNameStrategy()` Default, empty constructor.
`MethodNameStrategy(MethodNameStrategy.Prefix prefix)` Constructor allowing the naming prefix to be specified.

Method Summary
`java.lang.String` | `getBeanName(ModelMethod modelMethod)` Create the bean name based on the given method.
`void` | `setPrefix(MethodNameStrategy.Prefix prefix)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MethodNameStrategy

    public MethodNameStrategy()

  Default, empty constructor.

### MethodNameStrategy

    public MethodNameStrategy(MethodNameStrategy.Prefix prefix)

  Constructor allowing the naming prefix to be specified.

  Parameters:
    `prefix` - naming prefix

Method Detail

### getBeanName

    public java.lang.String getBeanName(ModelMethod modelMethod)

  Description copied from interface: `BeanNamingStrategy`
  Create the bean name based on the given method. If more contextual information is needed, consider using the `ModelMethod` API to get access to it or provide hooks inside the implementations.

  Specified by:
    `getBeanName` in interface `BeanNamingStrategy`
  Parameters:
    `modelMethod` - the method which creates the actual bean instance
  Returns:
    the bean name

### setPrefix

    public void setPrefix(MethodNameStrategy.Prefix prefix)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD