src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011,2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 22,36 ****
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.jobjc;
import com.apple.jobjc.JObjCRuntime.Width;
- import javax.tools.annotation.GenerateNativeHeader;
// Auto generated by PrimitiveCoder.hs
// Do not edit by hand.
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public abstract class PrimitiveCoder<T> extends Coder<T>{
public PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){
super(ffiTypeCode, objCEncoding, jclass, jprim);
}
public final boolean popBoolean(NativeArgumentBuffer args){
--- 22,33 ----
*** 128,139 ****
}
public abstract void push(JObjCRuntime runtime, long addr, double x);
// native BOOL -> java boolean
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class BoolCoder extends PrimitiveCoder<Boolean>{
public static final BoolCoder INST = new BoolCoder();
public BoolCoder(){ super(FFI_SINT8, "B", Boolean.class, boolean.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, boolean x){
--- 125,134 ----
*** 173,184 ****
}
// native schar -> java byte
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class SCharCoder extends PrimitiveCoder<Byte>{
public static final SCharCoder INST = new SCharCoder();
public SCharCoder(){ super(FFI_SINT8, "c", Byte.class, byte.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, byte x){
--- 168,177 ----
*** 218,229 ****
}
// native uchar -> java byte
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class UCharCoder extends PrimitiveCoder<Byte>{
public static final UCharCoder INST = new UCharCoder();
public UCharCoder(){ super(FFI_UINT8, "C", Byte.class, byte.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, byte x){
--- 211,220 ----
*** 263,274 ****
}
// native sshort -> java short
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class SShortCoder extends PrimitiveCoder<Short>{
public static final SShortCoder INST = new SShortCoder();
public SShortCoder(){ super(FFI_SINT16, "s", Short.class, short.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, short x){
--- 254,263 ----
*** 308,319 ****
}
// native ushort -> java short
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class UShortCoder extends PrimitiveCoder<Short>{
public static final UShortCoder INST = new UShortCoder();
public UShortCoder(){ super(FFI_UINT16, "S", Short.class, short.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, short x){
--- 297,306 ----
*** 353,364 ****
}
// native sint -> java int
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class SIntCoder extends PrimitiveCoder<Integer>{
public static final SIntCoder INST = new SIntCoder();
public SIntCoder(){ super(FFI_SINT32, "i", Integer.class, int.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, int x){
--- 340,349 ----
*** 398,409 ****
}
// native uint -> java int
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class UIntCoder extends PrimitiveCoder<Integer>{
public static final UIntCoder INST = new UIntCoder();
public UIntCoder(){ super(FFI_UINT32, "I", Integer.class, int.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, int x){
--- 383,392 ----
*** 443,454 ****
}
// native slong -> java long
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class SLongCoder extends PrimitiveCoder<Long>{
public static final SLongCoder INST = new SLongCoder();
public SLongCoder(){ super((JObjCRuntime.IS64 ? (FFI_SINT64) : (FFI_SINT32)), "l", Long.class, long.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, long x){
--- 426,435 ----
*** 494,505 ****
}
// native ulong -> java long
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class ULongCoder extends PrimitiveCoder<Long>{
public static final ULongCoder INST = new ULongCoder();
public ULongCoder(){ super((JObjCRuntime.IS64 ? (FFI_UINT64) : (FFI_UINT32)), "L", Long.class, long.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, long x){
--- 475,484 ----
*** 545,556 ****
}
// native slonglong -> java long
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class SLongLongCoder extends PrimitiveCoder<Long>{
public static final SLongLongCoder INST = new SLongLongCoder();
public SLongLongCoder(){ super(FFI_SINT64, "q", Long.class, long.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, long x){
--- 524,533 ----
*** 590,601 ****
}
// native ulonglong -> java long
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class ULongLongCoder extends PrimitiveCoder<Long>{
public static final ULongLongCoder INST = new ULongLongCoder();
public ULongLongCoder(){ super(FFI_UINT64, "Q", Long.class, long.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, long x){
--- 567,576 ----
*** 635,646 ****
}
// native float -> java float
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class FloatCoder extends PrimitiveCoder<Float>{
public static final FloatCoder INST = new FloatCoder();
public FloatCoder(){ super(FFI_FLOAT, "f", Float.class, float.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, float x){
--- 610,619 ----
*** 680,691 ****
}
// native double -> java double
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class DoubleCoder extends PrimitiveCoder<Double>{
public static final DoubleCoder INST = new DoubleCoder();
public DoubleCoder(){ super(FFI_DOUBLE, "d", Double.class, double.class); }
// compile time
@Override public void push(JObjCRuntime rt, long addr, double x){
--- 653,662 ----