com.sun.codemodel.JClass._implements()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中com.sun.codemodel.JClass._implements()方法的一些代码示例,展示了JClass._implements()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JClass._implements()方法的具体详情如下:
包路径:com.sun.codemodel.JClass
类名称:JClass
方法名:_implements

JClass._implements介绍

[英]Iterates all super interfaces directly implemented by this class/interface.
[中]迭代该类/接口直接实现的所有超级接口。

代码示例

代码示例来源:origin: joelittlejohn/jsonschema2pojo

private boolean extendsParcelable(final JDefinedClass jclass) {
  final java.util.Iterator<JClass> interfaces = jclass._extends() != null ? jclass._extends()._implements() : null;
  if (interfaces != null) {
    while (interfaces.hasNext()) {
      final JClass iface = interfaces.next();
      if (iface.erasure().name().equals("Parcelable")) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: javaee/jaxb-v2

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: com.sun.codemodel/codemodel

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: com.sun.codemodel/codemodel

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: javaee/jaxb-v2

/**
 * Returns the interface bounds of this variable.
 */
public Iterator<JClass> _implements() {
  return bound._implements();
}

代码示例来源:origin: javaee/jaxb-v2

public Iterator<JClass> _implements() {
  return new Iterator<JClass>() {
    private final Iterator<JClass> core = basis._implements();
    public void remove() {
      core.remove();
    }
    public JClass next() {
      return core.next().substituteParams(basis.typeParams(),args);
    }
    public boolean hasNext() {
      return core.hasNext();
    }
  };
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public Iterator<JClass> _implements() {
  return new Iterator<JClass>() {
    private final Iterator<JClass> core = basis._implements();
    public void remove() {
      core.remove();
    }
    public JClass next() {
      return core.next().substituteParams(basis.typeParams(),args);
    }
    public boolean hasNext() {
      return core.hasNext();
    }
  };
}

代码示例来源:origin: com.sun.codemodel/codemodel

public Iterator<JClass> _implements() {
  return new Iterator<JClass>() {
    private final Iterator<JClass> core = basis._implements();
    public void remove() {
      core.remove();
    }
    public JClass next() {
      return core.next().substituteParams(basis.typeParams(),args);
    }
    public boolean hasNext() {
      return core.hasNext();
    }
  };
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

public Iterator<JClass> _implements() {
  return new Iterator<JClass>() {
    private final Iterator<JClass> core = basis._implements();
    public void remove() {
      core.remove();
    }
    public JClass next() {
      return core.next().substituteParams(basis.typeParams(),args);
    }
    public boolean hasNext() {
      return core.hasNext();
    }
  };
}

代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel

public Iterator<JClass> _implements() {
  return new Iterator<JClass>() {
    private final Iterator<JClass> core = basis._implements();
    public void remove() {
      core.remove();
    }
    public JClass next() {
      return core.next().substituteParams(basis.typeParams(),args);
    }
    public boolean hasNext() {
      return core.hasNext();
    }
  };
}

代码示例来源:origin: com.cedarsoft.commons/codegen

private static boolean implementsInterface( @Nonnull JType type, @Nonnull Class<?> daClass ) {
 JType erasure = type.erasure();
 if ( erasure.fullName().equals( daClass.getName() ) ) {
  return true;
 }
 Iterator<JClass> implementedIterator = ( ( JClass ) erasure )._implements();
 while ( implementedIterator.hasNext() ) {
  JClass implemented = implementedIterator.next();
  if ( implemented.fullName().equals( daClass.getName() ) ) {
   return true;
  }
 }
 return false;
}

代码示例来源:origin: org.jsonschema2pojo/jsonschema2pojo-core

private boolean extendsParcelable(final JDefinedClass jclass) {
  final java.util.Iterator<JClass> interfaces = jclass._extends() != null ? jclass._extends()._implements() : null;
  if (interfaces != null) {
    while (interfaces.hasNext()) {
      final JClass iface = interfaces.next();
      if (iface.erasure().name().equals("Parcelable")) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

/**
 * Returns the set of all classes/interfaces that a given type
 * implements/extends, including itself.
 * 
 * For example, if you pass java.io.FilterInputStream, then the returned
 * set will contain java.lang.Object, java.lang.InputStream, and
 * java.lang.FilterInputStream.
 */
private static void getAssignableTypes( JClass t, Set<JClass> s ) {
  if(!s.add(t))
    return;
  // add its raw type
  s.add(t.erasure());
  // if this type is added for the first time,
  // recursively process the super class.
  JClass _super = t._extends();
  if(_super!=null)
    getAssignableTypes(_super,s);
  
  // recursively process all implemented interfaces
  Iterator<JClass> itr = t._implements();
  while(itr.hasNext())
    getAssignableTypes(itr.next(),s);
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Returns the set of all classes/interfaces that a given type
 * implements/extends, including itself.
 * 
 * For example, if you pass java.io.FilterInputStream, then the returned
 * set will contain java.lang.Object, java.lang.InputStream, and
 * java.lang.FilterInputStream.
 */
private static void getAssignableTypes( JClass t, Set<JClass> s ) {
  if(!s.add(t))
    return;
  // add its raw type
  s.add(t.erasure());
  // if this type is added for the first time,
  // recursively process the super class.
  JClass _super = t._extends();
  if(_super!=null)
    getAssignableTypes(_super,s);
  
  // recursively process all implemented interfaces
  Iterator<JClass> itr = t._implements();
  while(itr.hasNext())
    getAssignableTypes(itr.next(),s);
}

相关文章