org.jboss.webbeans.util
Class ApiAbstraction

java.lang.Object
  extended by org.jboss.webbeans.util.ApiAbstraction
Direct Known Subclasses:
EJBApiAbstraction, JSFApiAbstraction, PersistenceApiAbstraction, ServletApiAbstraction

public class ApiAbstraction
extends java.lang.Object

A base class for utility classes that represent annotations, classes etc

Author:
Pete Muir

Nested Class Summary
static interface ApiAbstraction.Dummy
          "Not found" class
static interface ApiAbstraction.DummyAnnotation
          "Not found" annotation
static class ApiAbstraction.DummyEnum
          "Not found" enumeration value.
 
Constructor Summary
ApiAbstraction(ResourceLoader resourceLoader)
          Constructor
 
Method Summary
protected  java.lang.Class<? extends java.lang.annotation.Annotation> annotationTypeForName(java.lang.String name)
          Initializes an annotation class
protected  java.lang.Class<?> classForName(java.lang.String name)
          Initializes a type
protected  java.lang.Object enumValue(java.lang.Class<?> clazz, java.lang.String memberName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiAbstraction

public ApiAbstraction(ResourceLoader resourceLoader)
Constructor

Parameters:
resourceLoader - The root resource loaderS
Method Detail

annotationTypeForName

protected java.lang.Class<? extends java.lang.annotation.Annotation> annotationTypeForName(java.lang.String name)
Initializes an annotation class

Parameters:
name - The name of the annotation class
Returns:
The instance of the annotation. Returns a dummy if the class was not found

classForName

protected java.lang.Class<?> classForName(java.lang.String name)
Initializes a type

Parameters:
name - The name of the class
Returns:
The instance of the class. Returns a dummy if the class was not found.

enumValue

protected java.lang.Object enumValue(java.lang.Class<?> clazz,
                                     java.lang.String memberName)


Copyright © 2011. All Rights Reserved.