本文整理匯總了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);
}
示例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));
}
}
示例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));
}
示例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();
}
示例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);
}
}
示例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;
}
示例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}");
}
示例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.");
}
示例10: createService
import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public SamlService createService(final String id) {
throw new NotImplementedException("This operation is not supported. ");
}
示例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. ");
}
示例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");
}
示例14: destroyDeviceImplementation
import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
@Override
public void destroyDeviceImplementation(Device device) {
throw new NotImplementedException("not implemented..."); //TODO
}
示例15: generateIdIfAbsentFromDocument
import org.apache.commons.lang3.NotImplementedException; //導入依賴的package包/類
default T generateIdIfAbsentFromDocument(T document) {
throw new NotImplementedException("Please implement in collectible implementations.");
}