// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.fasterxml.jackson.databind; import java.io.Serializable; public class PropertyMetadata implements Serializable { public static final PropertyMetadata STD_OPTIONAL; public static final PropertyMetadata STD_REQUIRED; public static final PropertyMetadata STD_REQUIRED_OR_OPTIONAL = new PropertyMetadata(null, null, null, null); private static final long serialVersionUID = -1L; protected final String _defaultValue; protected final String _description; protected final Integer _index; protected final Boolean _required; protected PropertyMetadata(Boolean boolean1, String s) { this(boolean1, s, null, null); } protected PropertyMetadata(Boolean boolean1, String s, Integer integer, String s1) { label0: { super(); _required = boolean1; _description = s; _index = integer; if (s1 != null) { boolean1 = s1; if (!s1.isEmpty()) { break label0; } } boolean1 = null; } _defaultValue = boolean1; } public static PropertyMetadata construct(boolean flag, String s) { return construct(flag, s, null, null); } public static PropertyMetadata construct(boolean flag, String s, Integer integer, String s1) { if (s != null || integer != null || s1 != null) { return new PropertyMetadata(Boolean.valueOf(flag), s, integer, s1); } if (flag) { return STD_REQUIRED; } else { return STD_OPTIONAL; } } public String getDefaultValue() { return _defaultValue; } public String getDescription() { return _description; } public Integer getIndex() { return _index; } public Boolean getRequired() { return _required; } public boolean hasDefaultValue() { return _defaultValue != null; } public boolean hasDefuaultValue() { return hasDefaultValue(); } public boolean hasIndex() { return _index != null; } public boolean isRequired() { return _required != null && _required.booleanValue(); } protected Object readResolve() { if (_description == null && _index == null && _defaultValue == null) { if (_required == null) { return STD_REQUIRED_OR_OPTIONAL; } if (_required.booleanValue()) { return STD_REQUIRED; } else { return STD_OPTIONAL; } } else { return this; } } public PropertyMetadata withDefaultValue(String s) { String s1; if (s == null || s.isEmpty()) { if (_defaultValue == null) { return this; } s1 = null; } else { s1 = s; if (_defaultValue.equals(s)) { return this; } } return new PropertyMetadata(_required, _description, _index, s1); } public PropertyMetadata withDescription(String s) { return new PropertyMetadata(_required, s, _index, _defaultValue); } public PropertyMetadata withIndex(Integer integer) { return new PropertyMetadata(_required, _description, integer, _defaultValue); } public PropertyMetadata withRequired(Boolean boolean1) { if (boolean1 != null ? _required != null && _required.booleanValue() == boolean1.booleanValue() : _required == null) { return this; } else { return new PropertyMetadata(boolean1, _description, _index, _defaultValue); } } static { STD_REQUIRED = new PropertyMetadata(Boolean.TRUE, null, null, null); STD_OPTIONAL = new PropertyMetadata(Boolean.FALSE, null, null, null); } }