Skip to content

Commit

Permalink
removed new, unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrimble committed Jan 18, 2017
1 parent cc652ae commit f713cba
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/main/java/org/bridj/StructFieldDeclaration.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class StructFieldDeclaration {

final StructFieldDescription desc = new StructFieldDescription();
Method setter;
ResolvedMember resolvedSetter;
long index = -1, unionWith = -1;//, byteOffset = -1;
Class<?> valueClass;
Class<?> declaringClass;
Expand Down Expand Up @@ -216,38 +215,6 @@ protected static ResolvedTypeWithMembers resolveType( Class<?> structClass ) {
AnnotationConfiguration annConfig = new AnnotationConfiguration.StdConfiguration(AnnotationInclusion.INCLUDE_BUT_DONT_INHERIT);
return mr.resolve(classType, annConfig, null);
}

protected static <T extends Member> void updateDecl(StructFieldDeclaration decl, ResolvedMember<T> member ) {
decl.declaringClass = member.getRawMember().getDeclaringClass();
Field field = member.get(Field.class);
Bits bits = member.get(Bits.class);
Alignment alignment = member.get(Alignment.class);
Array arr = member.get(Array.class);

if( field != null ) {
decl.index = field.value();
decl.unionWith = field.unionWith();
}
if( decl.unionWith < 0 && decl.declaringClass.getAnnotation(Union.class) != null) {
decl.unionWith = 0;
}
if( bits != null ) {
decl.desc.bitLength = bits.value();
}
if( alignment != null ) {
decl.desc.alignment = alignment.value();
}
if( arr != null ) {
long length = 1;
for (long dim : arr.value()) {
length *= dim;
}
decl.desc.arrayLength = length;
decl.desc.isArray = true;
}
decl.desc.isCLong = member.get(org.bridj.ann.CLong.class) != null;
decl.desc.isSizeT = member.get(org.bridj.ann.Ptr.class) != null;
}

@Deprecated
protected static StructFieldDeclaration fromField(java.lang.reflect.Field getter) {
Expand Down

0 comments on commit f713cba

Please sign in to comment.