Java 类net.sf.jasperreports.engine.component.ComponentCompiler 实例源码

项目:jasperreports    文件:JRVerifier.java   
protected void verifyComponentElement(JRComponentElement element)
{
    verifyReportElement(element);

    ComponentKey componentKey = element.getComponentKey();
    if (componentKey == null)
    {
        addBrokenRule("No component key set for component element", element);
    }

    Component component = element.getComponent();
    if (component == null)
    {
        addBrokenRule("No component set for component element", element);
    }

    if (componentKey != null && component != null)
    {
        ComponentCompiler compiler = 
            ComponentsEnvironment.getInstance(jasperReportsContext).getManager(componentKey).getComponentCompiler(jasperReportsContext);
        pushCurrentComponentElement(element);
        try
        {
            compiler.verify(component, this);
        }
        finally
        {
            popCurrentComponentElement();
        }
    }
}