TypeWriterFieldPoolRecordTest.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:byte-buddy 作者:
@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
    when(fieldDescription.getActualModifiers()).thenReturn(MODIFIER);
    when(fieldDescription.getInternalName()).thenReturn(FOO);
    when(fieldDescription.getDescriptor()).thenReturn(BAR);
    when(fieldDescription.getGenericSignature()).thenReturn(QUX);
    when(fieldDescription.getDeclaredAnnotations()).thenReturn(new AnnotationList.Explicit(annotationDescription));
    when(fieldDescription.getType()).thenReturn(TypeDescription.Generic.OBJECT);
    when(classVisitor.visitField(MODIFIER, FOO, BAR, QUX, defaultValue)).thenReturn(fieldVisitor);
    when(classVisitor.visitField(MODIFIER, FOO, BAR, QUX, FieldDescription.NO_DEFAULT_VALUE)).thenReturn(fieldVisitor);
    when(annotationValueFilterFactory.on(fieldDescription)).thenReturn(valueFilter);
    when(fieldVisitor.visitAnnotation(any(String.class), anyBoolean())).thenReturn(annotationVisitor);
    when(annotationDescription.getAnnotationType()).thenReturn(annotationType);
    when(annotationType.getDescriptor()).thenReturn(BAZ);
    when(annotationType.getDeclaredMethods()).thenReturn(new MethodList.Empty<MethodDescription.InDefinedShape>());
    when(annotationDescription.getRetention()).thenReturn(RetentionPolicy.RUNTIME);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号