Home
last modified time | relevance | path

Searched refs:newInstance (Results 1 – 25 of 599) sorted by relevance

12345678910>>...24

/external/dexmaker/dexmaker-mockito/src/main/java/com/android/dx/mockito/
DUnsafeAllocator.java30 public abstract <T> T newInstance(Class<T> c) throws Exception; in newInstance() method in UnsafeAllocator
46 public <T> T newInstance(Class<T> c) throws Exception { in create()
59 final Method newInstance = ObjectInputStream.class in create()
61 newInstance.setAccessible(true); in create()
65 public <T> T newInstance(Class<T> c) throws Exception { in create()
66 return (T) newInstance.invoke(null, c, Object.class); in create()
82 final Method newInstance = ObjectStreamClass.class in create()
84 newInstance.setAccessible(true); in create()
88 public <T> T newInstance(Class<T> c) throws Exception { in create()
89 return (T) newInstance.invoke(null, c, constructorId); in create()
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/dfp/
DDfp.java550 public Dfp newInstance() { in newInstance() method in Dfp
558 public Dfp newInstance(final byte x) { in newInstance() method in Dfp
566 public Dfp newInstance(final int x) { in newInstance() method in Dfp
574 public Dfp newInstance(final long x) { in newInstance() method in Dfp
582 public Dfp newInstance(final double x) { in newInstance() method in Dfp
591 public Dfp newInstance(final Dfp d) { in newInstance() method in Dfp
596 final Dfp result = newInstance(getZero()); in newInstance()
610 public Dfp newInstance(final String s) { in newInstance() method in Dfp
620 public Dfp newInstance(final byte sig, final byte code) { in newInstance() method in Dfp
755 final Dfp result = newInstance(getZero()); in lessThan()
[all …]
DDfpMath.java253 return base.newInstance(result); in pow()
272 return a.newInstance((byte)1, Dfp.INFINITE); in exp()
277 return a.newInstance(); in exp()
327 return a.dotrap(DfpField.FLAG_INVALID, "ln", a, a.newInstance((byte)1, Dfp.QNAN)); in log()
337 x = x.divide(pow(a.newInstance(10000), lr)); /* This puts x in the range 0-10000 */ in log()
352 spy[0] = a.newInstance("1.33333"); // Use spy[0] for comparison in log()
362 spx[0] = a.newInstance(new StringBuilder().append(p2+4*lr).toString()); in log()
369 spx[0] = a.newInstance(new StringBuilder().append(4*lr).toString()); in log()
376 return a.newInstance(spz[0].add(spz[1])); in log()
441 Dfp x = t.add(a[0].newInstance("-0.25")).divide(t.add(a[0].newInstance("0.25"))); in logInternal()
[all …]
DDfpDec.java98 public Dfp newInstance() { in newInstance() method in DfpDec
104 public Dfp newInstance(final byte x) { in newInstance() method in DfpDec
110 public Dfp newInstance(final int x) { in newInstance() method in DfpDec
116 public Dfp newInstance(final long x) { in newInstance() method in DfpDec
122 public Dfp newInstance(final double x) { in newInstance() method in DfpDec
128 public Dfp newInstance(final Dfp d) { in newInstance() method in DfpDec
133 final Dfp result = newInstance(getZero()); in newInstance()
144 public Dfp newInstance(final String s) { in newInstance() method in DfpDec
150 public Dfp newInstance(final byte sign, final byte nans) { in newInstance() method in DfpDec
300 final Dfp result = newInstance(getZero()); in nextAfter()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DUnknownFieldSetLiteTest.java63 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testMergeFieldFrom()
65 UnknownFieldSetLite instance = UnknownFieldSetLite.newInstance(); in testMergeFieldFrom()
76 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testSerializedSize()
78 UnknownFieldSetLite instance = UnknownFieldSetLite.newInstance(); in testSerializedSize()
85 UnknownFieldSetLite unknownFields = UnknownFieldSetLite.newInstance(); in testMergeVarintField()
89 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMergeVarintField()
99 UnknownFieldSetLite builder = UnknownFieldSetLite.newInstance(); in testMergeVarintField_negative()
103 CodedInputStream.newInstance(toByteString(builder).toByteArray()); in testMergeVarintField_negative()
113 UnknownFieldSetLite unknownFields1 = UnknownFieldSetLite.newInstance(); in testEqualsAndHashCode()
116 UnknownFieldSetLite unknownFields2 = UnknownFieldSetLite.newInstance(); in testEqualsAndHashCode()
[all …]
DCodedInputStreamTest.java106 CodedInputStream input = CodedInputStream.newInstance(data); in assertReadVarint()
110 input = CodedInputStream.newInstance(data); in assertReadVarint()
114 input = CodedInputStream.newInstance(data); in assertReadVarint()
118 input = CodedInputStream.newInstance(data); in assertReadVarint()
124 input = CodedInputStream.newInstance( in assertReadVarint()
129 input = CodedInputStream.newInstance( in assertReadVarint()
134 input = CodedInputStream.newInstance( in assertReadVarint()
139 input = CodedInputStream.newInstance( in assertReadVarint()
163 CodedInputStream input = CodedInputStream.newInstance(data); in assertReadVarintFailure()
171 input = CodedInputStream.newInstance(data); in assertReadVarintFailure()
[all …]
DParseExceptionsTest.java99 return DescriptorProto.parseFrom(in, ExtensionRegistry.newInstance()); in message_parseFrom_InputStreamAndExtensionRegistry()
110 return DescriptorProto.parseFrom(CodedInputStream.newInstance(in)); in message_parseFrom_CodedInputStream()
122 CodedInputStream.newInstance(in), ExtensionRegistry.newInstance()); in message_parseFrom_CodedInputStreamAndExtensionRegistry()
144 return DescriptorProto.parseDelimitedFrom(in, ExtensionRegistry.newInstance()); in message_parseDelimitedFrom_InputStreamAndExtensionRegistry()
167 .mergeFrom(in, ExtensionRegistry.newInstance()) in messageBuilder_mergeFrom_InputStreamAndExtensionRegistry()
179 return DescriptorProto.newBuilder().mergeFrom(CodedInputStream.newInstance(in)).build(); in messageBuilder_mergeFrom_CodedInputStream()
191 .mergeFrom(CodedInputStream.newInstance(in), ExtensionRegistry.newInstance()) in messageBuilder_mergeFrom_CodedInputStreamAndExtensionRegistry()
217 builder.mergeDelimitedFrom(in, ExtensionRegistry.newInstance()); in messageBuilder_mergeDelimitedFrom_InputStreamAndExtensionRegistry()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/
DConstraintFormula.java31 ReductionResult newInstance = new ReductionResult(); in withConstraint() local
32 newInstance.boundSet = this.boundSet; in withConstraint()
33 newInstance.constraintFormulas = new LinkedList<>(); in withConstraint()
34 newInstance.constraintFormulas.addAll(this.constraintFormulas); in withConstraint()
35 newInstance.constraintFormulas.add(constraintFormula); in withConstraint()
36 return newInstance; in withConstraint()
40 ReductionResult newInstance = new ReductionResult(); in withBound() local
41 newInstance.boundSet = this.boundSet.withBound(bound); in withBound()
42 newInstance.constraintFormulas = this.constraintFormulas; in withBound()
43 return newInstance; in withBound()
DInferenceVariableSubstitution.java28 InferenceVariableSubstitution newInstance = new InferenceVariableSubstitution(); in withPair() local
29 newInstance.inferenceVariables.addAll(this.inferenceVariables); in withPair()
30 newInstance.types.addAll(this.types); in withPair()
31 newInstance.inferenceVariables.add(inferenceVariable); in withPair()
32 newInstance.types.add(type); in withPair()
33 return newInstance; in withPair()
DSubstitution.java24 Substitution newInstance = new Substitution(); in withPair() local
25 newInstance.typeParameterDeclarations.addAll(this.typeParameterDeclarations); in withPair()
26 newInstance.types.addAll(this.types); in withPair()
27 newInstance.typeParameterDeclarations.add(typeParameterDeclaration); in withPair()
28 newInstance.types.add(type); in withPair()
29 return newInstance; in withPair()
DConstraintFormulaSet.java15 ConstraintFormulaSet newInstance = new ConstraintFormulaSet(); in withConstraint() local
16 newInstance.constraintFormulas.addAll(this.constraintFormulas); in withConstraint()
17 newInstance.constraintFormulas.add(constraintFormula); in withConstraint()
18 return newInstance; in withConstraint()
DInstantiationSet.java30 InstantiationSet newInstance = new InstantiationSet(); in withInstantiation() local
31 newInstance.instantiations.addAll(this.instantiations); in withInstantiation()
32 newInstance.instantiations.add(instantiation); in withInstantiation()
33 return newInstance; in withInstantiation()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowBitmapRegionDecoder.java27 protected static BitmapRegionDecoder newInstance( in newInstance() method in ShadowBitmapRegionDecoder
29 return fillWidthAndHeight(newInstance(), new ByteArrayInputStream(data)); in newInstance()
33 protected static BitmapRegionDecoder newInstance(FileDescriptor fd, boolean isShareable) in newInstance() method in ShadowBitmapRegionDecoder
35 return fillWidthAndHeight(newInstance(), new FileInputStream(fd)); in newInstance()
39 protected static BitmapRegionDecoder newInstance(InputStream is, boolean isShareable) in newInstance() method in ShadowBitmapRegionDecoder
41 return fillWidthAndHeight(newInstance(), is); in newInstance()
45 protected static BitmapRegionDecoder newInstance(String pathName, boolean isShareable) in newInstance() method in ShadowBitmapRegionDecoder
47 return fillWidthAndHeight(newInstance(), new FileInputStream(pathName)); in newInstance()
76 private static BitmapRegionDecoder newInstance() { in newInstance() method in ShadowBitmapRegionDecoder
DShadowBluetoothGatt.java22 public static BluetoothGatt newInstance(BluetoothDevice device) { in newInstance() method in ShadowBluetoothGatt
30 Shadow.newInstance( in newInstance()
42 Shadow.newInstance( in newInstance()
50 Shadow.newInstance( in newInstance()
58 Shadow.newInstance( in newInstance()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowAppTaskTest.java23 final AppTask appTask = ShadowAppTask.newInstance(); in finishAndRemoveTask_marksTaskFinished()
32 assertThat(shadowOf(ShadowAppTask.newInstance()).isFinishedAndRemoved()).isFalse(); in taskIsNotFinishedInitially()
37 assertThat(ShadowAppTask.newInstance().getTaskInfo()).isNull(); in getTaskInfo_returnsNullInitially()
42 final AppTask appTask = ShadowAppTask.newInstance(); in getTaskInfo_returnsCorrectValue()
53 final AppTask appTask = ShadowAppTask.newInstance(); in moveToFront_movesTaskToFront()
62 assertThat(shadowOf(ShadowAppTask.newInstance()).hasMovedToFront()).isFalse(); in taskIsNotMovedToFrontInitially()
67 final AppTask appTask = ShadowAppTask.newInstance(); in startActivity()
80 final AppTask appTask = ShadowAppTask.newInstance(); in setExcludeFromRecents_excludesFromRecents()
89 assertThat(shadowOf(ShadowAppTask.newInstance()).isExcludedFromRecents()).isFalse(); in taskIsNotExcludedFromRecentsInitially()
DShadowBitmapRegionDecoderTest.java33 …assertThat(BitmapRegionDecoder.newInstance(ByteStreams.toByteArray(getImageInputStream()), 0, 0, f… in testNewInstance()
35 assertThat(BitmapRegionDecoder.newInstance(getImageFd(), false)) in testNewInstance()
37 assertThat(BitmapRegionDecoder.newInstance(getImageInputStream(), false)) in testNewInstance()
39 assertThat(BitmapRegionDecoder.newInstance(getGeneratedImageFile(), false)) in testNewInstance()
45 BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(getImageInputStream(), true); in getWidthAndGetHeight_shouldReturnCorrectValuesForImage()
52 …BitmapRegionDecoder bitmapRegionDecoder = BitmapRegionDecoder.newInstance(getImageInputStream(), f… in testDecodeRegionReturnsExpectedSize()
62 …BitmapRegionDecoder bitmapRegionDecoder = BitmapRegionDecoder.newInstance(getImageInputStream(), f… in testDecodeRegionReturnsExpectedConfig()
DShadowNetworkTest.java25 Network network = ShadowNetwork.newInstance(netId); in getNetId_shouldReturnConstructorNetId()
33 Network network = ShadowNetwork.newInstance(0); in bindSocketDatagramSocket_shouldNotCrash()
39 Network network = ShadowNetwork.newInstance(0); in bindSocketSocket_shouldNotCrash()
46 Network network = ShadowNetwork.newInstance(0); in bindSocketFileDescriptor_shouldNotCrash()
/external/mockito/src/test/java/org/mockito/internal/creation/instance/
DConstructorInstantiatorTest.java44 …assertEquals(new ConstructorInstantiator(false, new Object[0]).newInstance(SomeClass.class).getCla… in creates_instances()
49 …assertEquals(new ConstructorInstantiator(true, this).newInstance(SomeInnerClass.class).getClass(),… in creates_instances_of_inner_classes()
50 …assertEquals(new ConstructorInstantiator(true, new ChildOfThis()).newInstance(SomeInnerClass.class… in creates_instances_of_inner_classes()
55 …assertEquals(new ConstructorInstantiator(false, "someString").newInstance(SomeClass2.class).getCla… in creates_instances_with_arguments()
60 …assertEquals(new ConstructorInstantiator(false, new Object[]{null}).newInstance(SomeClass2.class).… in creates_instances_with_null_arguments()
65 …assertEquals(new ConstructorInstantiator(false, 123).newInstance(SomeClass3.class).getClass(), Som… in creates_instances_with_primitive_arguments()
70 …assertEquals(new ConstructorInstantiator(false, new Object[]{null}).newInstance(SomeClass3.class).… in fails_when_null_is_passed_for_a_primitive()
76 new ConstructorInstantiator(false, new Object[0]).newInstance(SomeClass2.class); in explains_when_constructor_cannot_be_found()
/external/slf4j/log4j-over-slf4j/src/main/java/org/apache/log4j/
DLog4jLoggerFactory.java61 Logger newInstance = new Logger(name); in getLogger() local
62 Logger oldInstance = log4jLoggers.putIfAbsent(name, newInstance); in getLogger()
63 return oldInstance == null ? newInstance : oldInstance; in getLogger()
72 Logger newInstance = loggerFactory.makeNewLoggerInstance(name); in getLogger() local
73 Logger oldInstance = log4jLoggers.putIfAbsent(name, newInstance); in getLogger()
74 return oldInstance == null ? newInstance : oldInstance; in getLogger()
/external/robolectric-shadows/sandbox/src/test/java/org/robolectric/
DSandboxClassLoaderTest.java19 import static org.robolectric.util.ReflectionHelpers.newInstance;
107 Object instance = defaultCtor.newInstance(); in forClassesWithNoDefaultConstructor_shouldCreateOneButItShouldNotCallShadow()
118 Object instance = ctor.newInstance("new one"); in shouldDelegateToHandlerForConstructors()
174 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in callingNormalMethodShouldInvokeClassHandler()
188 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in shouldGenerateClassSpecificDirectAccessMethod()
230 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in callingNormalMethodReturningIntegerShouldInvokeClassHandler()
243 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in callingMethodReturningDoubleShouldInvokeClassHandler()
254 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in callingNativeMethodShouldInvokeClassHandler()
265 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in directlyCallingNativeMethodShouldBeNoOp()
275 Object exampleInstance = exampleClass.getDeclaredConstructor().newInstance(); in directlyCallingNativeMethodReturningPrimitiveShouldBeNoOp()
[all …]
/external/jsilver/src/com/google/clearsilver/jsilver/data/
DDelegatedData.java46 protected DelegatedData newInstance(Data newDelegate) { in newInstance() method in DelegatedData
118 return newInstance(getDelegate().getRoot()); in getRoot()
123 return newInstance(getDelegate().getParent()); in getParent()
138 return newInstance(getDelegate().getNextSibling()); in getNextSibling()
162 return newInstance(iterator.next()); in next()
197 return newInstance(getDelegate().getChild(path)); in getChild()
202 return newInstance(getDelegate().createChild(path)); in createChild()
229 return newInstance(getDelegate().getSymlink()); in getSymlink()
/external/testng/src/main/java/org/testng/internal/
DClassHelper.java48 public static <T> T newInstance(Class<T> clazz) { in newInstance() method in ClassHelper
50 T instance = clazz.newInstance(); in newInstance()
70 public static <T> T newInstance(Constructor<T> constructor, Object... parameters) { in newInstance() method in ClassHelper
72 return constructor.newInstance(parameters); in newInstance()
193 … IJUnitTestRunner tr = (IJUnitTestRunner) ClassHelper.forName(JUNIT_4_TESTRUNNER).newInstance(); in createTestRunner()
201 … IJUnitTestRunner tr = (IJUnitTestRunner) ClassHelper.forName(JUNIT_TESTRUNNER).newInstance(); in createTestRunner()
273 return (IMethodSelector) cls.newInstance(); in createSelector()
300 return objectFactory.newInstance(declaringClass); in createInstance2()
326 result = objectFactory.newInstance(constructor, parameters); in createInstance1()
353 Object o = objectFactory.newInstance(ec.getConstructor(parameterTypes)); in createInstance1()
[all …]
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DClonesArguments.java22 Object newInstance = instantiator.newInstance(from.getClass()); in answer() local
23 new LenientCopyTool().copyToRealObject(from, newInstance); in answer()
24 arguments[i] = newInstance; in answer()
/external/slf4j/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/
DSLF4JLogFactory.java154 Log newInstance; in getInstance() local
157 newInstance = new SLF4JLocationAwareLog((LocationAwareLogger) slf4jLogger); in getInstance()
159 newInstance = new SLF4JLog(slf4jLogger); in getInstance()
161 Log oldInstance = loggerMap.putIfAbsent(name, newInstance); in getInstance()
162 return oldInstance == null ? newInstance : oldInstance; in getInstance()
/external/guice/core/test/com/google/inject/internal/
DProxyFactoryTest.java50 Simple simple = constructionProxy.newInstance(); in testSimpleCase()
86 Foo foo = fooFactory.newInstance(); in testInterceptOneMethod()
87 Bar bar = barFactory.newInstance(); in testInterceptOneMethod()
140 A a = constructor.newInstance(5); in testWithConstructorArguments()
155 A a = constructor.newInstance(5); in testNotProxied()
181 Counter counter = constructor.newInstance(); in testMultipleInterceptors()

12345678910>>...24