Java源码示例:com.apple.internal.jobjc.generator.model.types.JType.JUnknown

示例1
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例2
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例3
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例4
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例5
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例6
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例7
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例8
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例9
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例10
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例11
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例12
protected JType accept(Type type, NPointer nt32, NPointer nt64){
    final CFType cfType = TypeCache.inst().getCFTypeForName(type.name);
    if(cfType != null) return new JCFType(cfType);

    final Opaque opaque = TypeCache.inst().getOpaqueForName(type.name);
    if(opaque != null) return new JOpaque(opaque);

    if("void*".equals(type.name)) return JPointer.VOID_PTR;

    if(type.name != null && type.name.endsWith("*")){
        final String subDeclaredType = type.name.substring(0, type.name.length() - 1);
        final Type subType = TypeCache.inst().getTypeByName(subDeclaredType);
        if (subType == null) return new JUnknown(type);
        // TODO Instead of JUnknown, VOID_PTR might be a good fallback. Investigate.

        final JType javaType = TypeToJType.inst().getJTypeFor(subType).getParameterizableType();

        final JPointer pointer = new JPointer(javaType);
        return pointer;
    }

    return new JUnknown(type);
}
 
示例13
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例14
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例15
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例16
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例17
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例18
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例19
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例20
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例21
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例22
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例23
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例24
public JType getJTypeFor(final Type type){
    return cache.get(type, new Map0<JType>(){
        public JType apply() {
            try {
                return Dispatcher.dispatch(TypeToJType.this.getClass(), TypeToJType.this, "accept", type, type.type32, type.type64);
            } catch (NoSuchMethodException e) {
                return new JUnknown(type);
            }
        }});
}
 
示例25
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}
 
示例26
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}
 
示例27
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}
 
示例28
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}
 
示例29
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}
 
示例30
protected JType accept(Type type, NStruct nt32, NStruct nt64){
    Struct st = TypeCache.inst().getStructForName(type.name);
    return st != null ? new JStruct(st) : new JUnknown(type);
    // TODO We could probably generate a struct here based on the type. But we need access to its parent framework.
    // Maybe we could use a fallback anonymous struct, but we need the SIZEOF.
}