/** * Setter for property {@code properties}. * * @param value the new collection of properties. * * @throws DuplicatePropertyException if {@code value} contains duplicate * properties. */ public void setProperties( final Property[] value ) { this.names.clear(); this.hashCode = 0; this.properties = null; if ( value != null ) { for ( int i = value.length - 1; i >= 0; i-- ) { this.hashCode += value[i].hashCode(); if ( this.names.put( value[i].getName(), value[i] ) != null ) { this.names.clear(); this.hashCode = 0; throw new DuplicatePropertyException( value[i].getName() ); } } this.properties = value; } }
declaredProperties.put( declaredProperty.getName(), declaredProperty ); superProperty.getName() ); if ( !declaredProperty.getType().equals( superProperty.getType() ) ) declaredProperty.getName(), declaredProperty.getType(), superProperty.getType() ); if ( declaredProperty.getDocumentation(). getValue() == null && superProperty.getDocumentation(). getValue() != null ) declaredProperty.setDocumentation( superProperty.getDocumentation() ); declaredProperties.put( superProperty.getName(), superProperty ); implementedProperty.getName(), implementedProperty ); !alreadyImplemented.getType().equals( implementedProperty.getType() ) )
throws ParseException final Property prop = new Property(); prop.setModelVersion( modelVersion ); prop.setName( xml.getAttributeNS( namespace, "name" ) ); prop.setApi( Boolean.valueOf( api ).booleanValue() ); DefaultModelBundle.getInstance(). getMissingPropertyTypeMessage( Locale.getDefault(), prop.getName(), xml.getParentNode().getParentNode().getLocalName() ) );
/** * Initializes the properties of the instance. * * @param meta the property values to initialize the instance with. * * @throws NullPointerException if {@code meta} is {@code null}. */ protected void initializeProperties(final Properties meta) { Property p; if(meta == null) { throw new NullPointerException("meta"); } p = meta.getProperty("configurationBundle"); this._configurationBundle = (java.lang.String) p.getValue(); }
implementedProperty.getName() ); if ( !implementedProperty.getType(). equals( alreadyImplemented.getType() ) ) implementedProperty.getName(), implementedProperty.getType(), alreadyImplemented.getType() ); properties.put( implementedProperty.getName(), implementedProperty ); implementedProperty.getName() ); if ( !property.getType(). equals( implementedProperty.getType() ) ) property.getName(), property.getType(), implementedProperty.getType() ); impl.getIdentifier(), implementedSpec.getIdentifier(), implementedProperty.getName() ); (Property) properties.get( property.getName() ); !property.getType().equals( specified.getType() ) ) property.getName(), property.getType(),
property.setType( Boolean.TYPE ); objectType = Boolean.class; property.setType( Byte.TYPE ); objectType = Byte.class; property.setType( Character.TYPE ); objectType = Character.class; property.setType( Double.TYPE ); objectType = Double.class; property.setType( Float.TYPE ); objectType = Float.class; property.setType( Integer.TYPE ); objectType = Integer.class; property.setType( Long.TYPE ); objectType = Long.class; property.setType( Short.TYPE ); objectType = Short.class; property.setType( Boolean.class ); objectType = Boolean.class; property.setType( Byte.class ); objectType = Byte.class;
/** * Creates and returns a deep copy of this object. * * @return a clone of this instance. */ public Object clone() { try { final Properties ret = (Properties) super.clone(); final Property[] props = this.getProperties(); final Property[] cloned = new Property[ props.length ]; for ( int i = props.length - 1; i >= 0; i-- ) { cloned[i] = (Property) props[i].clone(); } ret.setProperties( cloned ); return ret; } catch ( final CloneNotSupportedException e ) { throw new AssertionError( e ); } }
this.getDeclaredProperties().getProperty( i ); declaredProperties.put( declaredProperty.getName(), declaredProperty ); implementationProperty.getName(), implementationProperty ); if ( !dependencyProperty.getType().equals( property.getType() ) ) propertyName, property.getType(), dependencyProperty.getType() ); if ( property.getDocumentation().getValue() == null && dependencyProperty.getDocumentation(). getValue() != null ) property.setDocumentation( dependencyProperty.getDocumentation() );
/** * Indicates whether some other object is equal to this one by comparing * the values of all properties. * * @param o the reference object with which to compare. * * @return {@code true} if this object is the same as {@code o}; * {@code false} otherwise. */ public boolean equals( final Object o ) { boolean equal = this == o; if ( !equal && o instanceof Property ) { final Property that = (Property) o; equal = this.getName().equals( that.getName() ) && this.getType().equals( that.getType() ) && ( this.getValue() == null ? that.getValue() == null : this.getValue().equals( that.getValue() ) ); } return equal; }
/** * Initializes the properties of the instance. * * @param meta the property values to initialize the instance with. * * @throws NullPointerException if {@code meta} is {@code null}. */ protected void initializeProperties(final Properties meta) { Property p; if(meta == null) { throw new NullPointerException("meta"); } p = meta.getProperty("maxDescriptions"); this._maxDescriptions = ((java.lang.Integer) p.getValue()).intValue(); p = meta.getProperty("maxTransactions"); this._maxTransactions = ((java.lang.Integer) p.getValue()).intValue(); }
/** * Initializes the properties of the instance. * * @param meta the property values to initialize the instance with. * * @throws NullPointerException if {@code meta} is {@code null}. */ protected void initializeProperties(final Properties meta) { Property p; if(meta == null) { throw new NullPointerException("meta"); } p = meta.getProperty("transactionSeparator"); this._transactionSeparator = (java.lang.String) p.getValue(); p = meta.getProperty("fileSeparator"); this._fileSeparator = (java.lang.String) p.getValue(); p = meta.getProperty("fileExtension"); this._fileExtension = (java.lang.String) p.getValue(); }
/** * Initializes the properties of the instance. * * @param meta the property values to initialize the instance with. * * @throws NullPointerException if {@code meta} is {@code null}. */ protected void initializeProperties(final Properties meta) { Property p; if(meta == null) { throw new NullPointerException("meta"); } p = meta.getProperty("transactionSeparator"); this._transactionSeparator = (java.lang.String) p.getValue(); p = meta.getProperty("fileSeparator"); this._fileSeparator = (java.lang.String) p.getValue(); p = meta.getProperty("fileExtension"); this._fileExtension = (java.lang.String) p.getValue(); }
/** * Initializes the properties of the instance. * * @param meta the property values to initialize the instance with. * * @throws NullPointerException if {@code meta} is {@code null}. */ protected void initializeProperties(final Properties meta) { Property p; if(meta == null) { throw new NullPointerException("meta"); } p = meta.getProperty("propertiesFileName"); this._propertiesFileName = (java.lang.String) p.getValue(); p = meta.getProperty("logfileName"); this._logfileName = (java.lang.String) p.getValue(); p = meta.getProperty("directoryName"); this._directoryName = (java.lang.String) p.getValue(); p = meta.getProperty("stateDirectoryName"); this._stateDirectoryName = (java.lang.String) p.getValue(); p = meta.getProperty("dataDirectoryName"); this._dataDirectoryName = (java.lang.String) p.getValue(); p = meta.getProperty("configDirectoryName"); this._configDirectoryName = (java.lang.String) p.getValue(); p = meta.getProperty("binDirectoryName"); this._binDirectoryName = (java.lang.String) p.getValue(); }
public Object getProperty( final Object object, final String propertyName ) { if ( object == null ) { throw new NullPointerException( "object" ); } if ( propertyName == null ) { throw new NullPointerException( "propertyName" ); } return this.getInstance( object, this.getImplementation( object ) ). getProperties().getProperty( propertyName ).getValue(); }