public <M extends ModifiableElement> M annotateTypedType(M element, boolean useRawTypes) throws UnsupportedConversionException { element.addAnnotations(annotations); if (type != ConvType.Pointer || useRawTypes) { annotateRawType(element); } return element; } }
public <M extends ModifiableElement> M annotateTypedType(M element, boolean useRawTypes) throws UnsupportedConversionException { element.addAnnotations(annotations); if (type != ConvType.Pointer || useRawTypes) { annotateRawType(element); } return element; } }
public <M extends ModifiableElement> M annotateRawType(M element) throws UnsupportedConversionException { element.addAnnotations(annotations); if (type != null) { switch (type) { case Enum: case Primitive: case Void: break; case NativeLong: element.addAnnotation(new Annotation(typeRef(CLong.class))); break; case NativeSize: element.addAnnotation(new Annotation(typeRef(Ptr.class))); break; case Pointer: element.addAnnotation(new Annotation(typeRef(Ptr.class))); break; case Struct: case ComplexDouble: case FunctionSignature: case Default: case NativeTime: //throw new UnsupportedConversionException(typeRef, "Struct by value not supported yet"); break; default: throw new UnsupportedConversionException(typeRef, "Not supported"); } } return element; }
public <M extends ModifiableElement> M annotateRawType(M element) throws UnsupportedConversionException { element.addAnnotations(annotations); if (type != null) { switch (type) { case Enum: case Primitive: case Void: break; case NativeLong: element.addAnnotation(new Annotation(typeRef(CLong.class))); break; case NativeSize: element.addAnnotation(new Annotation(typeRef(Ptr.class))); break; case Pointer: element.addAnnotation(new Annotation(typeRef(Ptr.class))); break; case Struct: case ComplexDouble: case FunctionSignature: case Default: case NativeTime: //throw new UnsupportedConversionException(typeRef, "Struct by value not supported yet"); break; default: throw new UnsupportedConversionException(typeRef, "Not supported"); } } return element; }