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; }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
/** * Returns the interface bounds of this variable. */ public Iterator<JClass> _implements() { return bound._implements(); }
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(); } }; }
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(); } }; }
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(); } }; }
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(); } }; }
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(); } }; }
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; }
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; }
/** * 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); }
/** * 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); }