private Class<? extends PropertyEditor> validatePropertyEditor( final String className ) { return ObjectUtilities.loadAndValidate( className, DefaultAttributeMetaData.class, PropertyEditor.class ); }
private Class<? extends PropertyEditor> validatePropertyEditor( final String className ) { return ObjectUtilities.loadAndValidate( className, DefaultAttributeMetaData.class, PropertyEditor.class ); }
private Class<? extends UserDefinedExpressionPropertyReadHandler> parseReadHandler( final Attributes attrs ) { String propertyEditorClass = attrs.getValue( getUri(), "readHandler" ); // NON-NLS return ObjectUtilities.loadAndValidate( propertyEditorClass, ExpressionPropertyReadHandler.class, UserDefinedExpressionPropertyReadHandler.class ); }
private Class<? extends PropertyEditor> parsePropertyEditor( final Attributes attrs ) { String propertyEditorClass = attrs.getValue( getUri(), "propertyEditor" ); // NON-NLS return ObjectUtilities.loadAndValidate( propertyEditorClass, ExpressionPropertyReadHandler.class, PropertyEditor.class ); }
private Class<?> parseContentType( final Attributes attrs ) throws ParseException { final String contentType = attrs.getValue( getUri(), "content-type" ); if ( contentType == null ) { return Object.class; } else { Class<?> aClass = ObjectUtilities.loadAndValidate( contentType, ElementReadHandler.class, Object.class ); if ( aClass == null ) { return Object.class; } return aClass; } }
private Class<? extends PropertyEditor> parsePropertyEditor( final Attributes attrs ) { String propertyEditorClass = attrs.getValue( getUri(), "propertyEditor" ); // NON-NLS return ObjectUtilities.loadAndValidate( propertyEditorClass, ExpressionPropertyReadHandler.class, PropertyEditor.class ); }
private Class<? extends ExpressionPropertyWriteHandler> parseWriteHandler( final Attributes attrs ) { String propertyEditorClass = attrs.getValue( getUri(), "writeHandler" ); // NON-NLS return ObjectUtilities.loadAndValidate( propertyEditorClass, ExpressionPropertyReadHandler.class, ExpressionPropertyWriteHandler.class ); }
private Class<? extends ElementType> parseElementType( final Attributes attrs ) throws ParseException { final String elementTypeText = attrs.getValue( getUri(), "implementation" ); if ( elementTypeText == null ) { throw new ParseException( "Attribute 'implementation' is undefined", getLocator() ); } Class<? extends ElementType> c = ObjectUtilities.loadAndValidate( elementTypeText, ElementReadHandler.class, ElementType.class ); if ( c == null ) { throw new ParseException( "Attribute 'implementation' is not valid", getLocator() ); } return c; }
@Deprecated public DefaultExpressionPropertyMetaData( final String name, final String bundleLocation, final boolean expert, final boolean preferred, final boolean hidden, final boolean deprecated, final boolean mandatory, final boolean computed, final String propertyRole, final SharedBeanInfo beanInfo, final String propertyEditorClass, final ExpressionPropertyCore expressionPropertyCore, final MaturityLevel maturityLevel, final int compatibilityLevel, boolean designTimeProperty ) { super( name, bundleLocation, "property.", expert, preferred, hidden, deprecated, maturityLevel, compatibilityLevel ); ArgumentNullException.validate( "propertyRole", propertyRole ); ArgumentNullException.validate( "beanInfo", beanInfo ); ArgumentNullException.validate( "expressionPropertyCore", expressionPropertyCore ); this.propertyDescriptor = new SharedPropertyDescriptorProxy( beanInfo, name ); this.computed = computed; this.expressionPropertyCore = expressionPropertyCore; this.propertyEditorClass = ObjectUtilities.loadAndValidate( propertyEditorClass, DefaultExpressionPropertyMetaData.class, PropertyEditor.class ); this.mandatory = mandatory; this.propertyRole = propertyRole; this.designTimeProperty = designTimeProperty; }
public DefaultReportPreProcessorPropertyMetaData( final String name, final String bundleLocation, final boolean expert, final boolean preferred, final boolean hidden, final boolean deprecated, final boolean mandatory, final boolean computed, final String propertyRole, final SharedBeanInfo beanInfo, final String propertyEditorClass, final ReportPreProcessorPropertyCore reportPreProcessorCore, final MaturityLevel maturityLevel, final int compatibilityLevel ) { super( name, bundleLocation, "property.", expert, preferred, hidden, deprecated, maturityLevel, compatibilityLevel ); ArgumentNullException.validate( "propertyRole", propertyRole ); ArgumentNullException.validate( "beanInfo", beanInfo ); ArgumentNullException.validate( "reportPreProcessorCore", reportPreProcessorCore ); this.propertyDescriptor = new SharedPropertyDescriptorProxy( beanInfo, name ); this.reportPreProcessorCore = reportPreProcessorCore; this.computed = computed; this.propertyEditorClass = ObjectUtilities.loadAndValidate( propertyEditorClass, DefaultExpressionPropertyMetaData.class, PropertyEditor.class ); this.mandatory = mandatory; this.propertyRole = propertyRole; }
private Class<? extends ReportPreProcessor> parseImpl( final Attributes attrs ) throws ParseException { final Class<? extends ReportPreProcessor> expressionClass; final String valueTypeText = attrs.getValue( getUri(), "class" ); if ( valueTypeText == null ) { throw new ParseException( "Attribute 'class' is undefined", getLocator() ); } try { expressionClass = ObjectUtilities .loadAndValidate( valueTypeText, ReportPreProcessorReadHandler.class, ReportPreProcessor.class ); if ( ReportPreProcessor.class.isAssignableFrom( expressionClass ) == false ) { throw new ParseException( "Attribute 'class' is not valid", getLocator() ); } } catch ( ParseException pe ) { throw pe; } catch ( Exception e ) { throw new ParseException( "Attribute 'class' is not valid", e, getLocator() ); } return expressionClass; }
private Class<? extends ReportProcessTask> parseImpl( final Attributes attrs ) throws ParseException { final String implText = attrs.getValue( getUri(), "class" ); if ( implText == null ) { throw new ParseException( "Attribute 'class' is undefined", getLocator() ); } try { Class<? extends ReportProcessTask> c = ObjectUtilities.loadAndValidate( implText, ReportProcessTaskReadHandler.class, ReportProcessTask.class ); if ( c == null ) { throw new ParseException( "Attribute 'class' is not valid", getLocator() ); } return c; } catch ( ParseException pe ) { throw pe; } catch ( Exception e ) { throw new ParseException( "Attribute 'class' is not valid", e, getLocator() ); } }
private Class<? extends Expression> parseExpressionImpl( final Attributes attrs ) throws ParseException { final String implText = attrs.getValue( getUri(), "class" ); Class<? extends Expression> expressionClass; if ( implText == null ) { throw new ParseException( "Attribute 'class' is undefined", getLocator() ); } try { expressionClass = ObjectUtilities.loadAndValidate( implText, ExpressionReadHandler.class, Expression.class ); if ( expressionClass == null ) { throw new ParseException( "Attribute 'class' is not valid", getLocator() ); } } catch ( final ParseException pe ) { throw pe; } catch ( final Exception e ) { throw new ParseException( "Attribute 'class' is not valid", e, getLocator() ); } return expressionClass; }
/** * Starts parsing. * * @param attrs * the attributes. * @throws SAXException * if there is a parsing error. */ protected void startParsing( final Attributes attrs ) throws SAXException { super.startParsing( attrs ); getBuilder().namespace( parseNamespace( attrs ) ); getBuilder().namespacePrefix( parseNamespacePrefix( attrs ) ); getBuilder().mandatory( "true".equals( attrs.getValue( getUri(), "mandatory" ) ) ); // NON-NLS getBuilder().computed( "true".equals( attrs.getValue( getUri(), "computed" ) ) ); // NON-NLS getBuilder().transientFlag( "true".equals( attrs.getValue( getUri(), "transient" ) ) ); // NON-NLS getBuilder().bulk( "true".equals( attrs.getValue( getUri(), "prefer-bulk" ) ) ); // NON-NLS getBuilder().designTime( "true".equals( attrs.getValue( getUri(), "design-time-value" ) ) ); // NON-NLS getBuilder().targetClass( parseValueType( attrs ) ); getBuilder().valueRole( parseValueRole( attrs ) ); getBuilder().propertyEditor( ObjectUtilities.loadAndValidate( attrs.getValue( getUri(), "propertyEditor" ), AttributeReadHandler.class, PropertyEditor.class ) ); // NON-NLS getBuilder().core( parseAttributeCore( attrs ) ); getBuilder().bundle( getBundle(), computePrefix() ); }
/** * Starts parsing. * * @param attrs * the attributes. * @throws SAXException * if there is a parsing error. */ protected void startParsing( final Attributes attrs ) throws SAXException { super.startParsing( attrs ); getBuilder().key( StyleKey.getStyleKey( parseName( attrs ) ) ); getBuilder().propertyEditor( ObjectUtilities.loadAndValidate( attrs.getValue( getUri(), "propertyEditor" ), AttributeReadHandler.class, PropertyEditor.class ) ); // NON-NLS if ( getBundle() != null ) { getBuilder().bundle( getBundle(), "style." ); } else { getBuilder().bundle( getDefaultBundleName(), "style." ); } }