@Test public void testTypeCreation() throws Exception { StackManipulation stackManipulation = TypeCreation.of(typeDescription); assertThat(stackManipulation.isValid(), is(true)); StackManipulation.Size size = stackManipulation.apply(methodVisitor, implementationContext); assertThat(size.getSizeImpact(), is(1)); assertThat(size.getMaximalSize(), is(1)); verify(methodVisitor).visitTypeInsn(Opcodes.NEW, FOO); verifyNoMoreInteractions(methodVisitor); verifyZeroInteractions(implementationContext); }
protected TypeCreation(TypeDescription typeDescription) { this.typeDescription = typeDescription; }
TypeCreation implements StackManipulation { protected TypeCreation(TypeDescription typeDescription) { this.typeDescription = typeDescription; } }
TypeCreation implements StackManipulation { protected TypeCreation(TypeDescription typeDescription) { this.typeDescription = typeDescription; } protected  TypeCreation(TypeDescription typeDescription); }
TypeCreation implements StackManipulation { protected TypeCreation(TypeDescription typeDescription) { this.typeDescription = typeDescription; } protected  TypeCreation(TypeDescription typeDescription); static StackManipulation of(TypeDescription typeDescription); boolean isValid(); Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext); }
TypeCreation implements StackManipulation { protected TypeCreation(TypeDescription typeDescription) { this.typeDescription = typeDescription; } protected  TypeCreation(TypeDescription typeDescription); static StackManipulation of(TypeDescription typeDescription); boolean isValid(); Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext);  }