Apache MyFaces
Documentation
Foundation

CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

FileLine
org/apache/myfaces/commons/converter/_LocaleRule.java31
org/apache/myfaces/commons/converter/_TimeZoneRule.java31
final class _TimeZoneRule extends MetaRule {

    final static class ValueExpressionMetadata extends Metadata {

        private final String name;

        private final TagAttribute attr;

        private final Class type;

        public ValueExpressionMetadata(String name, Class type,
                TagAttribute attr) {
            this.name = name;
            this.attr = attr;
            this.type = type;
        }

        public void applyMetadata(FaceletContext ctx, Object instance) {
            ((ConverterBase) instance).setValueExpression(this.name, this.attr
                    .getValueExpression(ctx, this.type));
        }

    }
    
    final static class LiteralPropertyMetadata extends Metadata
    {

        private final Method method;

        private final TagAttribute attribute;

        private Object[] value;

        public LiteralPropertyMetadata(Method method, TagAttribute attribute)
        {
            this.method = method;
            this.attribute = attribute;
        }

        public void applyMetadata(FaceletContext ctx, Object instance)
        {
            if (value == null)
            {
                String str = this.attribute.getValue();
                value = new Object[] { java.util.TimeZone.getTimeZone( str ) };