本文整理汇总了Java中org.apache.commons.lang3.exception.CloneFailedException类的典型用法代码示例。如果您正苦于以下问题:Java CloneFailedException类的具体用法?Java CloneFailedException怎么用?Java CloneFailedException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CloneFailedException类属于org.apache.commons.lang3.exception包,在下文中一共展示了CloneFailedException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public AddGraph shallowClone() throws CloneFailedException {
final Builder builder = new Builder()
.graphId(graphId)
.schema(schema)
.storeProperties(storeProperties)
.parentSchemaIds(parentSchemaIds)
.parentPropertiesId(parentPropertiesId)
.options(this.options)
.isPublic(this.isPublic);
if (null != graphAuths) {
builder.graphAuths(graphAuths.toArray(new String[graphAuths.size()]));
}
return builder.build();
}
示例2: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public RemoveGraph shallowClone() throws CloneFailedException {
return new RemoveGraph.Builder()
.graphId(graphId)
.options(options)
.build();
}
示例3: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public Filter shallowClone() throws CloneFailedException {
return new Filter.Builder()
.input(input)
.entities(entities)
.edges(edges)
.globalElements(globalElements)
.globalEdges(globalEdges)
.globalEntities(globalEntities)
.options(options)
.build();
}
示例4: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public Aggregate shallowClone() throws CloneFailedException {
return new Aggregate.Builder()
.input(input)
.options(options)
.edges(edges)
.entities(entities)
.build();
}
示例5: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public Transform shallowClone() throws CloneFailedException {
return new Transform.Builder()
.input(input)
.options(options)
.edges(edges)
.entities(entities)
.build();
}
示例6: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public Map<I, O> shallowClone() throws CloneFailedException {
final Map<I, O> clone = new Map<>();
for (final Function func : functions) {
clone.getFunctions().add(func);
}
clone.setInput(input);
clone.setOptions(options);
return clone;
}
示例7: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
public OperationChain<OUT> shallowClone() throws CloneFailedException {
final OperationChain<OUT> clone = new OperationChain<>();
clone.setOptions(options);
for (final Operation operation : operations) {
clone.getOperations().add(operation.shallowClone());
}
return clone;
}
示例8: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public Operation shallowClone() throws CloneFailedException {
return new InputImpl.Builder()
.optionalField1(optionalField1)
.optionalField2(optionalField2)
.requiredField1(requiredField1)
.requiredField2(requiredField2)
.input(input)
.options(options)
.build();
}
示例9: shallowClone
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
@Override
public GetSchema shallowClone() throws CloneFailedException {
return new Builder()
.compact(compact)
.options(options)
.build();
}
示例10: testCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#clone(Object)} with an uncloneable object.
*/
public void testCloneOfUncloneable() {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.clone(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
assertEquals(NoSuchMethodException.class, e.getCause().getClass());
}
}
示例11: testPossibleCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object.
*/
public void testPossibleCloneOfUncloneable() {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.cloneIfPossible(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
assertEquals(NoSuchMethodException.class, e.getCause().getClass());
}
}
示例12: testCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#clone(Object)} with an uncloneable object.
*/
@Test(expected = NoSuchMethodException.class)
public void testCloneOfUncloneable() throws Throwable {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.clone(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
throw e.getCause();
}
}
示例13: testPossibleCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object.
*/
@Test(expected = NoSuchMethodException.class)
public void testPossibleCloneOfUncloneable() throws Throwable {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.cloneIfPossible(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
throw e.getCause();
}
}
示例14: testCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#clone(Object)} with an uncloneable object.
*
* @throws java.lang.Throwable because we expect this to fail
*/
@Test(expected = NoSuchMethodException.class)
public void testCloneOfUncloneable() throws Throwable {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.clone(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
throw e.getCause();
}
}
示例15: testPossibleCloneOfUncloneable
import org.apache.commons.lang3.exception.CloneFailedException; //导入依赖的package包/类
/**
* Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object.
*
* @throws java.lang.Throwable because we expect this to fail
*/
@Test(expected = NoSuchMethodException.class)
public void testPossibleCloneOfUncloneable() throws Throwable {
final UncloneableString string = new UncloneableString("apache");
try {
ObjectUtils.cloneIfPossible(string);
fail("Thrown " + CloneFailedException.class.getName() + " expected");
} catch (final CloneFailedException e) {
throw e.getCause();
}
}