@Test public void testgetJavaDataType() { test = getJavaDataType(getStubYangType(TYPE1)); assertThat(true, is(test.equals(CLASS_INFO1))); test = getJavaDataType(getStubYangType(TYPE2)); assertThat(true, is(test.equals(CLASS_INFO2))); test = getJavaDataType(getStubYangType(TYPE3)); assertThat(true, is(test.equals(CLASS_INFO3))); test = getJavaDataType(getStubYangType(TYPE4)); assertThat(true, is(test.equals(CLASS_INFO4))); }
public static String getJavaDataType(YangType<?> yangType) { YangDataTypes type = yangType.getDataType(); switch (type) { case INT8: return BYTE; case INT16: return SHORT; case INT32: return INT; case INT64: return LONG; case UINT8: return SHORT; case UINT16: return INT; case UINT32: return LONG; case UINT64: return BIG_INTEGER; case BINARY: return YANG_BINARY_CLASS; case DECIMAL64: return YANG_DECIMAL64_CLASS; case STRING: return STRING_DATA_TYPE; case BOOLEAN: return BOOLEAN_DATA_TYPE; default: throw new TranslatorException("given data type is not supported."); } }
AttributesJavaDataType { public static String getJavaDataType(YangType<?> yangType) { YangDataTypes type = yangType.getDataType(); switch (type) { case INT8: return BYTE; case INT16: return SHORT; case INT32: return INT; case INT64: return LONG; case UINT8: return SHORT; case UINT16: return INT; case UINT32: return LONG; case UINT64: return BIG_INTEGER; case BINARY: return YANG_BINARY_CLASS; case DECIMAL64: return YANG_DECIMAL64_CLASS; case STRING: return STRING_DATA_TYPE; case BOOLEAN: return BOOLEAN_DATA_TYPE; default: throw new TranslatorException("given data type is not supported."); } } }
AttributesJavaDataType { public static String getJavaDataType(YangType<?> yangType) { YangDataTypes type = yangType.getDataType(); switch (type) { case INT8: return BYTE; case INT16: return SHORT; case INT32: return INT; case INT64: return LONG; case UINT8: return SHORT; case UINT16: return INT; case UINT32: return LONG; case UINT64: return BIG_INTEGER; case BINARY: return YANG_BINARY_CLASS; case DECIMAL64: return YANG_DECIMAL64_CLASS; case STRING: return STRING_DATA_TYPE; case BOOLEAN: return BOOLEAN_DATA_TYPE; default: throw new TranslatorException("given data type is not supported."); } } private  AttributesJavaDataType(); }
AttributesJavaDataType { public static String getJavaDataType(YangType<?> yangType) { YangDataTypes type = yangType.getDataType(); switch (type) { case INT8: return BYTE; case INT16: return SHORT; case INT32: return INT; case INT64: return LONG; case UINT8: return SHORT; case UINT16: return INT; case UINT32: return LONG; case UINT64: return BIG_INTEGER; case BINARY: return YANG_BINARY_CLASS; case DECIMAL64: return YANG_DECIMAL64_CLASS; case STRING: return STRING_DATA_TYPE; case BOOLEAN: return BOOLEAN_DATA_TYPE; default: throw new TranslatorException("given data type is not supported."); } } private  AttributesJavaDataType(); static String getJavaDataType(YangType<?> yangType); static String getJavaImportClass(YangType<?> yangType, boolean isListAttr,
                                            YangToJavaNamingConflictUtil pluginConfig); static String getJavaImportPackage(YangType<?> yangType, boolean isListAttr,
                                              YangToJavaNamingConflictUtil conflictResolver); static void updateJavaFileInfo(YangNode yangNode,
                                          YangToJavaNamingConflictUtil conflictResolver); }
AttributesJavaDataType { public static String getJavaDataType(YangType<?> yangType) { YangDataTypes type = yangType.getDataType(); switch (type) { case INT8: return BYTE; case INT16: return SHORT; case INT32: return INT; case INT64: return LONG; case UINT8: return SHORT; case UINT16: return INT; case UINT32: return LONG; case UINT64: return BIG_INTEGER; case BINARY: return YANG_BINARY_CLASS; case DECIMAL64: return YANG_DECIMAL64_CLASS; case STRING: return STRING_DATA_TYPE; case BOOLEAN: return BOOLEAN_DATA_TYPE; default: throw new TranslatorException("given data type is not supported."); } } private  AttributesJavaDataType(); static String getJavaDataType(YangType<?> yangType); static String getJavaImportClass(YangType<?> yangType, boolean isListAttr,
                                            YangToJavaNamingConflictUtil pluginConfig); static String getJavaImportPackage(YangType<?> yangType, boolean isListAttr,
                                              YangToJavaNamingConflictUtil conflictResolver); static void updateJavaFileInfo(YangNode yangNode,
                                          YangToJavaNamingConflictUtil conflictResolver);  }