/** * Gets the properties of the module. * * @return the properties of the module. */ public Properties getProperties() { if ( this.properties == null ) { this.properties = new Properties(); } return this.properties; }
/** * Gets a property for an index. * * @param index the index of the property to return. * * @return a reference to the property at {@code index}. * * @throws IndexOutOfBoundsException if {@code index} is negativ, * greater than or equal to {@code size()}. */ public final Property getProperty( final int index ) { if ( index < 0 || index >= this.size() ) { throw new ArrayIndexOutOfBoundsException( index ); } return this.getProperties()[index]; }
/** * Creates a string representing the properties of the instance. * * @return a string representing the properties of the instance. */ private String internalString() { final StringBuffer buf = new StringBuffer( 200 ).append( '{' ); buf.append( this.internalString( this ) ); final Property[] props = this.getProperties(); for ( int i = props.length - 1; i >= 0; i-- ) { buf.append( ", [" ).append( i ).append( "]=" ).append( props[i] ); } buf.append( '}' ); return buf.toString(); }
final Map dependencyProperties = new TreeMap(); for ( int i = this.getDeclaredProperties().size() - 1; i >= 0; i-- ) this.getDeclaredProperties().getProperty( i ); size() - 1; i >= 0; i-- ) getProperty( i ); final Properties p = new Properties(); p.setProperties( (Property[]) dependencyProperties.values().toArray( new Property[ dependencyProperties.size() ] ) );
/** * 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(); }
for ( int p = props.size() - 1; p >= 0; p-- ) props.getProperty( p ); impl.getProperties().getProperty( implementedProperty.getName() ); for ( int p = impl.getProperties().size() - 1; p >= 0; p-- ) final Property property = impl.getProperties().getProperty( p ); final Property specified = (Property) properties.get( property.getName() );
final Property p = this.getProperty( property.getName() ); if ( !p.getType().equals( property.getType() ) ) final Collection props = Arrays.asList( this.getProperties() ); props.add( property ); this.setProperties( (Property[]) props.toArray( new Property[ props.size() ] ) );
final Properties props = new Properties(); props.setModelVersion( modelVersion ); props.setProperties( (Property[]) transformed.values().toArray( new Property[ transformed.size() ] ) );
/** * 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 ); } }
/** * Gets the number of properties held by the instance. * * @return the number of properties held by the instance. */ public final int size() { return this.getProperties().length; }
/** * Returns a string representation of the object. * * @return a string representation of the object. */ public String toString() { return super.toString() + this.internalString(); }
final Map implementedProperties = new TreeMap(); for ( int i = this.getDeclaredProperties().size() - 1; i >= 0; i-- ) this.getDeclaredProperties().getProperty( i ); this.getParent().getProperties(); for ( int i = superProperties.size() - 1; i >= 0; i-- ) superProperties.getProperty( i ); for ( int p = spec.getProperties().size() - 1; p >= 0; p-- ) spec.getProperties().getProperty( p ); final Properties p = new Properties(); p.setProperties( (Property[]) declaredProperties.values().toArray( new Property[ declaredProperties.size() ] ) );
/** * 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(); }
if ( dep.getSpecification().getScope() != Specification.SCOPE_MULTITON && dep.getDeclaredProperties().size() > 0 ) for ( int p = properties.size() - 1; p >= 0; p-- ) properties.getProperty( p ); getProperty( dependencyProperty.getName() );
/** * 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(); }
/** * 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 Properties ) { final Properties that = (Properties) o; final Collection these = Arrays.asList( this.getProperties() ); final Collection those = Arrays.asList( that.getProperties() ); equal = this.size() == that.size() && these.containsAll( those ); } return equal; }
/** * Gets the declared properties of the dependency. * * @return the declared properties of the dependency. */ public Properties getDeclaredProperties() { if ( this.properties == null ) { this.properties = new Properties(); } return this.properties; }
/** * 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(); }
/** * Gets the properties of the specification. * * @return the properties of the specification. */ public Properties getProperties() { if ( this.properties == null ) { this.properties = new Properties(); } return this.properties; }
/** * 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(); }