org.apache.aries.blueprint.reflect
Class MetadataUtil

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

public class MetadataUtil
extends java.lang.Object

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

Version:
$Rev: 822644 $, $Date: 2009-10-07 11:23:35 +0100 (Wed, 07 Oct 2009) $

Field Summary
static java.util.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(java.lang.Class<T> type)
          Create a new metadata instance of the given type
static boolean isPrototypeScope(BeanMetadata metadata)
           
static boolean isSingletonScope(BeanMetadata metadata)
           
static java.util.List<BeanArgument> validateBeanArguments(java.util.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 java.util.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(java.lang.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 java.util.List<BeanArgument> validateBeanArguments(java.util.List<BeanArgument> arguments)

isPrototypeScope

public static boolean isPrototypeScope(BeanMetadata metadata)

isSingletonScope

public static boolean isSingletonScope(BeanMetadata metadata)


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