Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.blueprint.reflect;
 
 import java.util.List;

Metadata for a Bean component.

This is specified by the bean element.

Author(s):
$Id: 725928b126cb26462428e32024f18af7a0a40a4e $
ThreadSafe:
 
 public interface BeanMetadata extends TargetComponentMetadata {

The bean has singleton scope.

See also:
getScope()
 
 	static final String	SCOPE_SINGLETON"singleton";

The bean has prototype scope.

See also:
getScope()
 
 	static final String	SCOPE_PROTOTYPE"prototype";

Return the name of the class specified for the bean. This is specified by the class attribute of the bean definition.

Returns:
The name of the class specified for the bean. If no class is specified in the bean definition, because the a factory component is used instead, then this method will return null.
 
Return the name of the init method specified for the bean. This is specified by the init-method attribute of the bean definition.

Returns:
The name of the init method specified for the bean, or null if no init method is specified.
 
Return the name of the destroy method specified for the bean. This is specified by the destroy-method attribute of the bean definition.

Returns:
The name of the destroy method specified for the bean, or null if no destroy method is specified.
 
Return the arguments for the factory method or constructor of the bean. This is specified by the child argument elements.

Returns:
An immutable List of BeanArgument objects for the factory method or constructor of the bean. The List is empty if no arguments are specified for the bean.
 
Return the properties for the bean. This is specified by the child property elements.

Returns:
An immutable List of BeanProperty objects, with one entry for each property to be injected in the bean. The List is empty if no property injection is specified for the bean.
 
Return the name of the factory method for the bean. This is specified by the factory-method attribute of the bean.

Returns:
The name of the factory method of the bean or null if no factory method is specified for the bean.
Return the Metadata for the factory component on which to invoke the factory method for the bean. This is specified by the factory-ref attribute of the bean.

When a factory method and factory component have been specified for the bean, this method returns the factory component on which to invoke the factory method for the bean. When no factory component has been specified this method will return null. When a factory method has been specified for the bean but a factory component has not been specified, the factory method must be invoked as a static method on the bean's class.

Returns:
The Metadata for the factory component on which to invoke the factory method for the bean or null if no factory component is specified.
Return the scope for the bean.

Returns:
The scope for the bean. Returns null if the scope has not been explicitly specified in the bean definition.
See also:
SCOPE_SINGLETON
SCOPE_PROTOTYPE
New to GrepCode? Check out our FAQ X