Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.engine
Class DescriptorResolver

java.lang.Object
  extended byorg.evolvica.engine.DescriptorResolver

public class DescriptorResolver
extends java.lang.Object

Resolver for descriptors.

Since:
0.6.0
Version:
$Revision: 1.7 $ $Date: 2004/05/26 11:58:23 $
Author:
Andreas Rummler

Constructor Summary
DescriptorResolver()
           
 
Method Summary
static OperatorDescriptor copy(OperatorDescriptor desc)
          Creates a complete copy of a descriptor.
static boolean isValid(OperatorDescriptor descriptor)
          Checks if the given descriptor has an associated class file.
static java.net.URI locateDescriptor(java.lang.Class clazz)
          Locates a descriptor for the given class.
static java.net.URI locateDescriptor(java.lang.String className)
          Locates a descriptor for the given class.
static java.net.URI locateDescriptor(java.lang.String className, java.lang.ClassLoader loader)
          Locates a descriptor for a given class by using the provided class loader.
static java.net.URI locateDescriptor(java.lang.String className, java.net.URI location)
          Locates a descriptor for a given class at the given location.
static void main(java.lang.String[] args)
           
static void resolve(AttributeDescriptor ad, java.lang.Class clazz)
          Resolves the given attribute descriptor.
static void resolve(AttributeDescriptor ad, java.lang.Object obj)
          Resolves the given attribute descriptor.
static void resolve(OperatorDescriptor descriptor)
          Attempts to resolve this descriptor.
static void resolve(OperatorDescriptor descriptor, java.lang.ClassLoader loader)
          Attempts to resolve this descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorResolver

public DescriptorResolver()
Method Detail

copy

public static OperatorDescriptor copy(OperatorDescriptor desc)
Creates a complete copy of a descriptor.

Parameters:
desc - original descriptor
Returns:
copy of the given descriptor

isValid

public static boolean isValid(OperatorDescriptor descriptor)
Checks if the given descriptor has an associated class file.

Parameters:
descriptor - operator descriptor
Returns:
true, if the descriptor is valid, false instead

locateDescriptor

public static java.net.URI locateDescriptor(java.lang.Class clazz)
Locates a descriptor for the given class.

Parameters:
clazz - class
Returns:
URI poiting to the descriptor or null if no descriptor has been found

locateDescriptor

public static java.net.URI locateDescriptor(java.lang.String className)
Locates a descriptor for the given class.

Parameters:
className - name of the class
Returns:
URI poiting to the descriptor or null if no descriptor has been found

locateDescriptor

public static java.net.URI locateDescriptor(java.lang.String className,
                                            java.lang.ClassLoader loader)
Locates a descriptor for a given class by using the provided class loader.

Parameters:
className - name of the class
loader - class loader to be used
Returns:
URI poiting to the descriptor or null if no descriptor has been found

locateDescriptor

public static java.net.URI locateDescriptor(java.lang.String className,
                                            java.net.URI location)
Locates a descriptor for a given class at the given location.

Parameters:
className - name of the class
location - location of the class
Returns:
URI poiting to the descriptor or null if no descriptor has been found

resolve

public static void resolve(AttributeDescriptor ad,
                           java.lang.Class clazz)
Resolves the given attribute descriptor.

Parameters:
ad - descriptor to be resolved
clazz - class that is the parent of the property to be resolved

resolve

public static void resolve(AttributeDescriptor ad,
                           java.lang.Object obj)
Resolves the given attribute descriptor.

Parameters:
ad - descriptor to be resolved
obj - object that is the parent of the property to be resolved

resolve

public static void resolve(OperatorDescriptor descriptor)
Attempts to resolve this descriptor. This method tries to retrieve the classes for beanClass and datatype from the beanClassName and datatypeName properties. It uses the current system class loader.

Parameters:
descriptor - descriptor to be resolved

resolve

public static void resolve(OperatorDescriptor descriptor,
                           java.lang.ClassLoader loader)
Attempts to resolve this descriptor. This method tries to retrieve the classes for beanClass and datatype from the beanClassName and datatypeName properties by use of the given class loader.

Parameters:
descriptor - operator descriptor to be resolved
loader - class loader to be used for resolving

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems