当前位置: 首页>>代码示例>>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;未经允许,请勿转载。