Skip to content

Commit

Permalink
converted field and method filters into lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrimble committed Jan 18, 2017
1 parent 6058170 commit cc652ae
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/main/java/org/bridj/StructFieldDeclaration.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,10 @@ protected static ResolvedTypeWithMembers resolveType( Class<?> structClass ) {
TypeResolver resolver = new TypeResolver();
ResolvedType classType = resolver.resolve(structClass);
MemberResolver mr = new MemberResolver(resolver);
mr.setMethodFilter(new Filter<RawMethod>() {
@Override
public boolean include( RawMethod method ) {
return
mr.setMethodFilter(method->
method.getRawMember().getParameterTypes().length < 2 &&
!method.isStatic();
}
});
mr.setFieldFilter(new Filter<RawField>() {
@Override
public boolean include( RawField field ) {
return !field.isStatic();
}
});
!method.isStatic());
mr.setFieldFilter(field->!field.isStatic());
AnnotationConfiguration annConfig = new AnnotationConfiguration.StdConfiguration(AnnotationInclusion.INCLUDE_BUT_DONT_INHERIT);
return mr.resolve(classType, annConfig, null);
}
Expand Down

0 comments on commit cc652ae

Please sign in to comment.