/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.web.bundle; import java.util.Map; import org.joda.beans.Bean; import org.joda.beans.BeanBuilder; import org.joda.beans.BeanDefinition; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaProperty; import org.joda.beans.Property; import org.joda.beans.PropertyDefinition; import org.joda.beans.impl.direct.DirectBean; import org.joda.beans.impl.direct.DirectBeanBuilder; import org.joda.beans.impl.direct.DirectMetaBean; import org.joda.beans.impl.direct.DirectMetaProperty; import org.joda.beans.impl.direct.DirectMetaPropertyMap; /** * Bean to capture YUICompressor options. */ @BeanDefinition public class YUICompressorOptions extends DirectBean { /** * The line break position. */ @PropertyDefinition private int _lineBreakPosition; /** * The munge flag. */ @PropertyDefinition private boolean _munge; /** * The preserve semi-colon flag. */ @PropertyDefinition private boolean _preserveAllSemiColons; /** * The optimize flag. */ @PropertyDefinition private boolean _optimize; /** * The warn flag. */ @PropertyDefinition private boolean _warn; //------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF /** * The meta-bean for {@code YUICompressorOptions}. * @return the meta-bean, not null */ public static YUICompressorOptions.Meta meta() { return YUICompressorOptions.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(YUICompressorOptions.Meta.INSTANCE); } @Override public YUICompressorOptions.Meta metaBean() { return YUICompressorOptions.Meta.INSTANCE; } //----------------------------------------------------------------------- /** * Gets the line break position. * @return the value of the property */ public int getLineBreakPosition() { return _lineBreakPosition; } /** * Sets the line break position. * @param lineBreakPosition the new value of the property */ public void setLineBreakPosition(int lineBreakPosition) { this._lineBreakPosition = lineBreakPosition; } /** * Gets the the {@code lineBreakPosition} property. * @return the property, not null */ public final Property<Integer> lineBreakPosition() { return metaBean().lineBreakPosition().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the munge flag. * @return the value of the property */ public boolean isMunge() { return _munge; } /** * Sets the munge flag. * @param munge the new value of the property */ public void setMunge(boolean munge) { this._munge = munge; } /** * Gets the the {@code munge} property. * @return the property, not null */ public final Property<Boolean> munge() { return metaBean().munge().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the preserve semi-colon flag. * @return the value of the property */ public boolean isPreserveAllSemiColons() { return _preserveAllSemiColons; } /** * Sets the preserve semi-colon flag. * @param preserveAllSemiColons the new value of the property */ public void setPreserveAllSemiColons(boolean preserveAllSemiColons) { this._preserveAllSemiColons = preserveAllSemiColons; } /** * Gets the the {@code preserveAllSemiColons} property. * @return the property, not null */ public final Property<Boolean> preserveAllSemiColons() { return metaBean().preserveAllSemiColons().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the optimize flag. * @return the value of the property */ public boolean isOptimize() { return _optimize; } /** * Sets the optimize flag. * @param optimize the new value of the property */ public void setOptimize(boolean optimize) { this._optimize = optimize; } /** * Gets the the {@code optimize} property. * @return the property, not null */ public final Property<Boolean> optimize() { return metaBean().optimize().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the warn flag. * @return the value of the property */ public boolean isWarn() { return _warn; } /** * Sets the warn flag. * @param warn the new value of the property */ public void setWarn(boolean warn) { this._warn = warn; } /** * Gets the the {@code warn} property. * @return the property, not null */ public final Property<Boolean> warn() { return metaBean().warn().createProperty(this); } //----------------------------------------------------------------------- @Override public YUICompressorOptions clone() { return JodaBeanUtils.cloneAlways(this); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == this.getClass()) { YUICompressorOptions other = (YUICompressorOptions) obj; return (getLineBreakPosition() == other.getLineBreakPosition()) && (isMunge() == other.isMunge()) && (isPreserveAllSemiColons() == other.isPreserveAllSemiColons()) && (isOptimize() == other.isOptimize()) && (isWarn() == other.isWarn()); } return false; } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + JodaBeanUtils.hashCode(getLineBreakPosition()); hash = hash * 31 + JodaBeanUtils.hashCode(isMunge()); hash = hash * 31 + JodaBeanUtils.hashCode(isPreserveAllSemiColons()); hash = hash * 31 + JodaBeanUtils.hashCode(isOptimize()); hash = hash * 31 + JodaBeanUtils.hashCode(isWarn()); return hash; } @Override public String toString() { StringBuilder buf = new StringBuilder(192); buf.append("YUICompressorOptions{"); int len = buf.length(); toString(buf); if (buf.length() > len) { buf.setLength(buf.length() - 2); } buf.append('}'); return buf.toString(); } protected void toString(StringBuilder buf) { buf.append("lineBreakPosition").append('=').append(JodaBeanUtils.toString(getLineBreakPosition())).append(',').append(' '); buf.append("munge").append('=').append(JodaBeanUtils.toString(isMunge())).append(',').append(' '); buf.append("preserveAllSemiColons").append('=').append(JodaBeanUtils.toString(isPreserveAllSemiColons())).append(',').append(' '); buf.append("optimize").append('=').append(JodaBeanUtils.toString(isOptimize())).append(',').append(' '); buf.append("warn").append('=').append(JodaBeanUtils.toString(isWarn())).append(',').append(' '); } //----------------------------------------------------------------------- /** * The meta-bean for {@code YUICompressorOptions}. */ public static class Meta extends DirectMetaBean { /** * The singleton instance of the meta-bean. */ static final Meta INSTANCE = new Meta(); /** * The meta-property for the {@code lineBreakPosition} property. */ private final MetaProperty<Integer> _lineBreakPosition = DirectMetaProperty.ofReadWrite( this, "lineBreakPosition", YUICompressorOptions.class, Integer.TYPE); /** * The meta-property for the {@code munge} property. */ private final MetaProperty<Boolean> _munge = DirectMetaProperty.ofReadWrite( this, "munge", YUICompressorOptions.class, Boolean.TYPE); /** * The meta-property for the {@code preserveAllSemiColons} property. */ private final MetaProperty<Boolean> _preserveAllSemiColons = DirectMetaProperty.ofReadWrite( this, "preserveAllSemiColons", YUICompressorOptions.class, Boolean.TYPE); /** * The meta-property for the {@code optimize} property. */ private final MetaProperty<Boolean> _optimize = DirectMetaProperty.ofReadWrite( this, "optimize", YUICompressorOptions.class, Boolean.TYPE); /** * The meta-property for the {@code warn} property. */ private final MetaProperty<Boolean> _warn = DirectMetaProperty.ofReadWrite( this, "warn", YUICompressorOptions.class, Boolean.TYPE); /** * The meta-properties. */ private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap( this, null, "lineBreakPosition", "munge", "preserveAllSemiColons", "optimize", "warn"); /** * Restricted constructor. */ protected Meta() { } @Override protected MetaProperty<?> metaPropertyGet(String propertyName) { switch (propertyName.hashCode()) { case -1489046604: // lineBreakPosition return _lineBreakPosition; case 104258340: // munge return _munge; case -1613870185: // preserveAllSemiColons return _preserveAllSemiColons; case -79080739: // optimize return _optimize; case 3641990: // warn return _warn; } return super.metaPropertyGet(propertyName); } @Override public BeanBuilder<? extends YUICompressorOptions> builder() { return new DirectBeanBuilder<YUICompressorOptions>(new YUICompressorOptions()); } @Override public Class<? extends YUICompressorOptions> beanType() { return YUICompressorOptions.class; } @Override public Map<String, MetaProperty<?>> metaPropertyMap() { return _metaPropertyMap$; } //----------------------------------------------------------------------- /** * The meta-property for the {@code lineBreakPosition} property. * @return the meta-property, not null */ public final MetaProperty<Integer> lineBreakPosition() { return _lineBreakPosition; } /** * The meta-property for the {@code munge} property. * @return the meta-property, not null */ public final MetaProperty<Boolean> munge() { return _munge; } /** * The meta-property for the {@code preserveAllSemiColons} property. * @return the meta-property, not null */ public final MetaProperty<Boolean> preserveAllSemiColons() { return _preserveAllSemiColons; } /** * The meta-property for the {@code optimize} property. * @return the meta-property, not null */ public final MetaProperty<Boolean> optimize() { return _optimize; } /** * The meta-property for the {@code warn} property. * @return the meta-property, not null */ public final MetaProperty<Boolean> warn() { return _warn; } //----------------------------------------------------------------------- @Override protected Object propertyGet(Bean bean, String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case -1489046604: // lineBreakPosition return ((YUICompressorOptions) bean).getLineBreakPosition(); case 104258340: // munge return ((YUICompressorOptions) bean).isMunge(); case -1613870185: // preserveAllSemiColons return ((YUICompressorOptions) bean).isPreserveAllSemiColons(); case -79080739: // optimize return ((YUICompressorOptions) bean).isOptimize(); case 3641990: // warn return ((YUICompressorOptions) bean).isWarn(); } return super.propertyGet(bean, propertyName, quiet); } @Override protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case -1489046604: // lineBreakPosition ((YUICompressorOptions) bean).setLineBreakPosition((Integer) newValue); return; case 104258340: // munge ((YUICompressorOptions) bean).setMunge((Boolean) newValue); return; case -1613870185: // preserveAllSemiColons ((YUICompressorOptions) bean).setPreserveAllSemiColons((Boolean) newValue); return; case -79080739: // optimize ((YUICompressorOptions) bean).setOptimize((Boolean) newValue); return; case 3641990: // warn ((YUICompressorOptions) bean).setWarn((Boolean) newValue); return; } super.propertySet(bean, propertyName, newValue, quiet); } } ///CLOVER:ON //-------------------------- AUTOGENERATED END -------------------------- }