當前位置: 首頁>>代碼示例>>Java>>正文


Java NotImplementedException類代碼示例

本文整理匯總了Java中org.apache.commons.lang3.NotImplementedException的典型用法代碼示例。如果您正苦於以下問題:Java NotImplementedException類的具體用法?Java NotImplementedException怎麽用?Java NotImplementedException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NotImplementedException類屬於org.apache.commons.lang3包,在下文中一共展示了NotImplementedException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getDataType

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
private DataType getDataType(int type) {
    switch (type) {
        case LiteralType.BOOLEAN:
            return DataTypes.BooleanType;
        case LiteralType.STRING:
            return DataTypes.StringType;
        case LiteralType.FLOAT:
            return DataTypes.FloatType;
        case LiteralType.DOUBLE:
            return DataTypes.DoubleType;
        case LiteralType.INTEGER:
            return DataTypes.IntegerType;
        case LiteralType.LONG:
            return DataTypes.LongType;
        case LiteralType.DATETIME:
            // datetime not supported due to timezone issues with java.sql.Timestamp
            // check the InstanceAggregator for more info
            return DataTypes.StringType;
    }
    throw new NotImplementedException("Not able to write literal type " + type);
}
 
開發者ID:Merck,項目名稱:rdf2x,代碼行數:22,代碼來源:InstanceRelationWriter.java

示例2: generateDiagram

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
String generateDiagram() throws MojoExecutionException {

        switch (diagramType) {
            case plantuml:
                PlantumlClassDiagramBuilder builder = new PlantumlClassDiagramBuilder(project, packageRoot, excludes,
                        rootAggregateColor == null || rootAggregateColor.isEmpty() ? DEFAULT_ROOT_COLOR : rootAggregateColor, diagramHeader, diagramFooter, diagramShowMethods, diagramShowFields,
                        diagramWithDependencies, diagramLinkPage);
                if (onlyAnnotated) {
                    builder.filterOnAnnotation(UbiquitousLanguage.class);
                }
                if (diagramWithLink && !DiagramImageType.png.equals(diagramImageType)) {
                    builder.mapNames(glossaryMapping);
                }
                return builder.generate();
            default:
                throw new NotImplementedException(String.format("format %s is not implemented yet", diagramType));
        }
    }
 
開發者ID:jboz,項目名稱:living-documentation,代碼行數:19,代碼來源:DiagramMojo.java

示例3: handle

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public void handle(Connection connection, RetrieveItemRewardPacket packet)
{
    Character character = gameDataRetreiver.getUserCharacterByConnectionId(connection.getID());
    CharactersQuests quest = findSuiteQuest(character.getQuests(), packet.getQuestName());
    CharactersQuestsItemReward itemReward = findSuiteItemReward(quest.getItemsReward(), packet.getItemIdentifier());
    PlayerCharacter player = (PlayerCharacter) gameContainer.getObject(character.getId());
    InventoryPosition inventoryPosition = new InventoryPosition(packet.getDesiredInventoryPage(),
            packet.getDesiredInventoryX(), packet.getDesiredInventoryY());
    Item gameItem;
    if (itemReward.getNumberOfItems() == packet.getNumberOfItems())
        gameItem = GameItemsFactory.produce(itemReward.getItemIdentifier(), itemReward.getNumberOfItems(),
                IdSupplier.getId(), inventoryPosition);
    else
        throw new NotImplementedException("Not implemented yet");

    player.addItemAllowStacking(gameItem);
    connection.sendTCP(PacketsMaker.makeItemRewardRemovePacket(packet.getItemIdentifier(),
            itemReward.getNumberOfItems()));
    connection.sendTCP(PacketsMaker.makeItemPacket(gameItem));
}
 
開發者ID:MMORPG-Prototype,項目名稱:MMORPG_Prototype,代碼行數:22,代碼來源:RetrieveItemRewardPacketHandler.java

示例4: create

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public <R> TypeAdapter<R> create(Gson gson, TypeToken<R> type) {
  if (type.getRawType() != baseType) {
    return null;
  }

  return new TypeAdapter<R>() {
    @Override public R read(JsonReader in) throws IOException {
      JsonElement jsonElement = Streams.parse(in);
      JsonElement labelJsonElement = jsonElement.getAsJsonObject().remove(typeFieldName);
      if (labelJsonElement == null) {
        throw new JsonParseException("cannot deserialize " + baseType
            + " because it does not define a field named " + typeFieldName);
      }
      String label = labelJsonElement.getAsString();
      
      try {
        String subclassName = baseType.getName() + "$" + label.replaceAll("\\s", "");
        Class<?> subclass = Class.forName(subclassName);
        @SuppressWarnings("unchecked")
        TypeAdapter<R> delegate = (TypeAdapter<R>) gson.getDelegateAdapter(
            InnerClassTypeAdapterFactory.this, TypeToken.get(subclass));
        if (delegate == null) {
          throw new JsonParseException("cannot deserialize " + baseType + " subtype named "
              + label);
        }
        return delegate.fromJsonTree(jsonElement);
      } catch (ClassNotFoundException e) {
        throw new JsonParseException("cannot deserialize " + baseType + " subtype named "
            + label);
      }
    }

    @Override public void write(JsonWriter out, R value) throws IOException {
      throw new NotImplementedException("Write not implemented for InnerClassTypeAdapter");
    }
  }.nullSafe();
}
 
開發者ID:synthetichealth,項目名稱:synthea_java,代碼行數:39,代碼來源:InnerClassTypeAdapterFactory.java

示例5: createPersistor

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
public static Persistor createPersistor(OutputConfig config) {
    OutputConfig.OutputTarget target = config.getTarget();
    switch (target) {
        case DB:
            try {
                String driverClassName = config.getDbConfig().getDriverClassName();
                switch (driverClassName) {
                    case "org.postgresql.Driver":
                        return new DbPersistorPostgres(config.getDbConfig(), config.getSaveMode());
                    case "com.microsoft.sqlserver.jdbc.SQLServerDriver":
                        return new DbPersistorSQLServer(config.getDbConfig(), config.getSaveMode());
                }
            } catch (ConfigurationException ignored) {
            }
            return new DbPersistor(config.getDbConfig(), config.getSaveMode());
        case CSV:
            return new CSVPersistor(config.getFileConfig(), config.getSaveMode());
        case JSON:
            return new JSONPersistor(config.getFileConfig(), config.getSaveMode());
        case ES:
            return new ElasticSearchPersistor(config.getEsConfig());
        case Preview:
            return new PreviewPersistor();
        case DataFrameMap:
            return new DataFrameMapPersistor(config.getResultMap());
        default:
            throw new NotImplementedException("Output not supported: " + config);
    }
}
 
開發者ID:Merck,項目名稱:rdf2x,代碼行數:30,代碼來源:PersistorFactory.java

示例6: handleNotImplementedException

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@ExceptionHandler(NotImplementedException.class)
@ResponseStatus(value = HttpStatus.NOT_IMPLEMENTED)
@ResponseBody
public XAPIErrorInfo handleNotImplementedException(final HttpServletRequest request, final NotImplementedException e) {
    final XAPIErrorInfo result = new XAPIErrorInfo(HttpStatus.NOT_IMPLEMENTED, request, e.getLocalizedMessage());
    this.logException(e);
    this.logError(result);
    return result;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:OpenLRW,代碼行數:10,代碼來源:XAPIExceptionHandlerAdvice.java

示例7: get

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public <T> Codec<T> get(Type type, TypeCodecRegistry typeCodecRegistry) {
    // byte arrays are handled well by the mongo java driver
    if (TypeUtils.isArrayType(type)) {
        return new ArrayCodec(type, typeCodecRegistry);
    } else if (type instanceof TypeVariable) {
        throw new IllegalArgumentException("This registry (and probably no other one as well) can not handle generic type variables.");
    } else if (type instanceof WildcardType) {
        LOGGER.error("WildcardTypes are not yet supported. {}", type);
        throw new NotImplementedException("WildcardTypes are not yet supported. " + type);
    }
    // the default codecs provided by the mongo driver lack the decode method, hence this redefinition
    else if (Float.class.equals(type)) {
        return (Codec<T>) FLOAT_CODEC;
    } else if (Short.class.equals(type)) {
        return (Codec<T>) SHORT_CODEC;
    } else if (Byte.class.equals(type)) {
        return (Codec<T>) BYTE_CODEC;
    }
    else if (TypeUtils.isAssignable(type, SpecialFieldsMap.class)) {
        return new SpecialFieldsMapCodec(type, typeCodecRegistry);
    }

    // List ?
    Codec<T> codec = ListTypeCodec.getCodecIfApplicable(type, typeCodecRegistry);
    if (codec != null) {
        return codec;
    }
    // Set ?
    codec = SetTypeCodec.getCodecIfApplicable(type, typeCodecRegistry);
    if (codec != null) {
        return codec;
    }
    // Map ?
    codec = MapTypeCodec.getCodecIfApplicable(type, typeCodecRegistry);
    if (codec != null) {
        return codec;
    }
    return null;
}
 
開發者ID:axelspringer,項目名稱:polymorphia,代碼行數:41,代碼來源:PojoContext.java

示例8: toResponse

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Test
public void toResponse() {
	final EmptyResultDataAccessException exception = new EmptyResultDataAccessException("message-error", 1,
			new NotImplementedException("message-error2"));
	check(mock(new NoResultExceptionMapper()).toResponse(exception), 404,
			"{\"code\":\"entity\",\"message\":\"message-error2\",\"parameters\":null,\"cause\":null}");
}
 
開發者ID:ligoj,項目名稱:bootstrap,代碼行數:8,代碼來源:NoResultExceptionMapperTest.java

示例9: substituteIntoPassages

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
public PassageContent substituteIntoPassages(String text, String uri, List<Link> links) {
	throw new NotImplementedException("Not implemented yet.");
}
 
開發者ID:Lambda-3,項目名稱:Graphene,代碼行數:4,代碼來源:Coreference.java

示例10: createService

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public SamlService createService(final String id) {
    throw new NotImplementedException("This operation is not supported. ");
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:5,代碼來源:SamlServiceFactory.java

示例11: extractServiceInternal

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public WebApplicationService extractServiceInternal(final HttpServletRequest request) {
    throw new NotImplementedException("This operation is not supported. "
            + "The class is deprecated and will be removed in future versions");
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:6,代碼來源:GoogleAccountsArgumentExtractor.java

示例12: createService

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public GoogleAccountsService createService(final String id) {
    throw new NotImplementedException("This operation is not supported. ");
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:5,代碼來源:GoogleAccountsServiceFactory.java

示例13: extractServiceInternal

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
protected WebApplicationService extractServiceInternal(final HttpServletRequest request) {
    throw new NotImplementedException("This operation is not supported. "
            + "The class is deprecated and will be removed in future versions");
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:6,代碼來源:OpenIdArgumentExtractor.java

示例14: destroyDeviceImplementation

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public void destroyDeviceImplementation(Device device) {
    throw new NotImplementedException("not implemented..."); //TODO
}
 
開發者ID:MatzeS,項目名稱:blackbird,代碼行數:5,代碼來源:LocalHostDeviceImplementation.java

示例15: generateIdIfAbsentFromDocument

import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
default T generateIdIfAbsentFromDocument(T document) {
    throw new NotImplementedException("Please implement in collectible implementations.");
}
 
開發者ID:axelspringer,項目名稱:polymorphia,代碼行數:4,代碼來源:TypeCodec.java


注:本文中的org.apache.commons.lang3.NotImplementedException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。