package org.opendaylight.mdsal.binding.yang.types;
import com.google.common.collect.ImmutableMap;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.math.BigDecimal;
import org.opendaylight.mdsal.binding.generator.spi.TypeProvider;
-import org.opendaylight.mdsal.binding.model.api.JavaTypeName;
import org.opendaylight.mdsal.binding.model.api.Restrictions;
import org.opendaylight.mdsal.binding.model.api.Type;
import org.opendaylight.mdsal.binding.model.util.Types;
*/
public static final Type UINT64_TYPE = Types.typeForClass(Uint64.class);
- public static final Type UNION_TYPE = new UnionType();
-
/**
* <code>Type</code> representation of <code>binary</code> YANG type.
*/
.put("uint16", UINT16_TYPE)
.put("uint32", UINT32_TYPE)
.put("uint64", UINT64_TYPE)
- .put("union", UNION_TYPE)
.put("binary", BINARY_TYPE)
.put("instance-identifier", INSTANCE_IDENTIFIER)
.build();
return Types.typeForClass(Uint32.class, restrictions);
case "uint64":
return Types.typeForClass(Uint64.class, restrictions);
- case "union" :
- return UNION_TYPE;
default:
return javaTypeForSchemaDefinitionType(type, parentNode, lenientRelativeLeafrefs);
}
return "_" + BindingMapping.getPropertyName(type.getQName().getLocalName());
}
};
-
- // FIXME: 5.0.0: remove this class
- @Deprecated
- public static final class UnionType implements Type {
- @Override
- public String getPackageName() {
- return null;
- }
-
- @Override
- public String getName() {
- return "Union";
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "Union";
- }
-
- @Override
- @SuppressFBWarnings("NP_NONNULL_RETURN_VIOLATION")
- public JavaTypeName getIdentifier() {
- return null;
- }
- }
}