org.apache.aries.blueprint.reflect
Class MetadataUtil

java.lang.Object
  extended by org.apache.aries.blueprint.reflect.MetadataUtil

public class MetadataUtil
extends Object

A utility class that handles cloning various polymorphic bits of metadata into concrete class implementations.

Version:
$Rev$, $Date$

Field Summary
static Comparator<BeanArgument> BEAN_COMPARATOR
           
 
Constructor Summary
MetadataUtil()
           
 
Method Summary
static ComponentMetadata cloneComponentMetadata(ComponentMetadata source)
          Clone a component metadata item, returning a mutable instance.
static Metadata cloneMetadata(Metadata source)
           
static Target cloneTarget(Target source)
          Clone a target item, returning a mutable instance.
static
<T extends Metadata>
T
createMetadata(Class<T> type)
          Create a new metadata instance of the given type
static boolean isCustomScope(BeanMetadata metadata)
           
static boolean isPrototypeScope(BeanMetadata metadata)
           
static boolean isSingletonScope(BeanMetadata metadata)
           
static List<BeanArgument> validateBeanArguments(List<BeanArgument> arguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_COMPARATOR

public static final Comparator<BeanArgument> BEAN_COMPARATOR
Constructor Detail

MetadataUtil

public MetadataUtil()
Method Detail

cloneMetadata

public static Metadata cloneMetadata(Metadata source)

cloneComponentMetadata

public static ComponentMetadata cloneComponentMetadata(ComponentMetadata source)
Clone a component metadata item, returning a mutable instance.

Parameters:
source - The source metadata item.
Returns:
A mutable instance of this metadata item.

cloneTarget

public static Target cloneTarget(Target source)
Clone a target item, returning a mutable instance.

Parameters:
source - The source target item.
Returns:
A mutable instance of this target item.

createMetadata

public static <T extends Metadata> T createMetadata(Class<T> type)
Create a new metadata instance of the given type

Type Parameters:
T -
Parameters:
type - the class of the Metadata object to create
Returns:
a new instance

validateBeanArguments

public static List<BeanArgument> validateBeanArguments(List<BeanArgument> arguments)

isPrototypeScope

public static boolean isPrototypeScope(BeanMetadata metadata)

isSingletonScope

public static boolean isSingletonScope(BeanMetadata metadata)

isCustomScope

public static boolean isCustomScope(BeanMetadata metadata)


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.