Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.commons
[Java] Class InstanceFactoryBean

    java.lang.Object
      org.codehaus.groovy.grails.commons.InstanceFactoryBean

All Implemented Interfaces:
  org.springframework.beans.factory.FactoryBean

    public class InstanceFactoryBean
    extends java.lang.Object

Simple singleton instance implementation of Spring's FactoryBean interface mainly useful in unit tests

Constructor Summary
`InstanceFactoryBean()`
`InstanceFactoryBean(java.lang.Object object, java.lang.Class objectType)`
`InstanceFactoryBean(java.lang.Object object)`

Method Summary
`java.lang.Object` | `getObject()`
`java.lang.Class` | `getObjectType()`
`boolean` | `isSingleton()`
`void` | `setObject(java.lang.Object object)`
`void` | `setObjectType(java.lang.Class objectType)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### InstanceFactoryBean

    public InstanceFactoryBean()

### InstanceFactoryBean

    public InstanceFactoryBean(java.lang.Object object, java.lang.Class objectType)

### InstanceFactoryBean

    public InstanceFactoryBean(java.lang.Object object)

Method Detail

### getObject

    @java.lang.Override
    public java.lang.Object getObject()

### getObjectType

    @java.lang.Override
    public java.lang.Class getObjectType()

### isSingleton

    @java.lang.Override
    public boolean isSingleton()

### setObject

    public void setObject(java.lang.Object object)

### setObjectType

    public void setObjectType(java.lang.Class objectType)

Groovy Documentation