@Test(expected = IllegalArgumentException.class) public void testTypeCreationPrimitive() throws Exception { when(typeDescription.isPrimitive()).thenReturn(true); TypeCreation.of(typeDescription); }
public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescription); }
TypeCreation implements StackManipulation { public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescription); } }
TypeCreation implements StackManipulation { public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescription); } protected  TypeCreation(TypeDescription typeDescription); }
TypeCreation implements StackManipulation { public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescription); } protected  TypeCreation(TypeDescription typeDescription); static StackManipulation of(TypeDescription typeDescription); boolean isValid(); Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext); }
TypeCreation implements StackManipulation { public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescription); } protected  TypeCreation(TypeDescription typeDescription); static StackManipulation of(TypeDescription typeDescription); boolean isValid(); Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext);  }