FileDocCategorySizeDatePackage
WebComponentsContext.javaAPI DocGlassfish v2 API3847Fri May 04 22:31:32 BST 2007com.sun.enterprise.deployment.annotation.context

WebComponentsContext

public class WebComponentsContext extends AnnotationContext implements ComponentContext
This provides a context for a collection of web components with the same impl class name.
author
Shing Wai Chan

Fields Summary
private WebComponentContext[]
webCompContexts
private String
componentClassName
Constructors Summary
public WebComponentsContext(com.sun.enterprise.deployment.WebComponentDescriptor[] webComps)

        webCompContexts = new WebComponentContext[webComps.length];
        for (int i = 0; i < webComps.length ; i++) {
            webCompContexts[i] = new WebComponentContext(webComps[i]);
        }
        if (webComps[0].isServlet()) {
            componentClassName = webComps[0].getWebComponentImplementation();
        }
    
public WebComponentsContext(WebComponentContext[] webCompContexts)
Create a new instance of WebComponentContext. Note that, for performance, we don't make a safe copy of array here.

        this.webCompContexts = webCompContexts;
        this.componentClassName = webCompContexts[0].getComponentClassName();
    
Methods Summary
public voidendElement(java.lang.annotation.ElementType type, java.lang.reflect.AnnotatedElement element)

        
        if (ElementType.TYPE.equals(type)) {
            // done with processing this class, let's pop this context
            getProcessingContext().popHandler();
        }
    
public java.lang.StringgetComponentClassName()

        return componentClassName;
    
public WebComponentContext[]getWebComponentContexts()
Note that, for performance, we don't make a safe copy of array here.

        return webCompContexts;