gatherTypes(c.getSuperclass(), types); JClassType[] interfaces = c.getImplementedInterfaces(); if (interfaces != null) {
gatherTypes(c.getSuperclass(), types); JClassType[] interfaces = c.getImplementedInterfaces(); if (interfaces != null) {
if (c != null && (isVisible(c.getSuperclass()))) superClass = c.getSuperclass().getErasedType().getQualifiedSourceName() + ".class"; String assignables = null; String interfaces = null;
if (c != null && (isVisible(c.getSuperclass()))) superClass = c.getSuperclass().getErasedType().getQualifiedSourceName() + ".class"; String assignables = null; String interfaces = null;
/** * Determine if a type is derived from CssResource. */ private boolean derivedFromCssResource(JClassType type, JClassType cssResourceType) { List<JClassType> superInterfaces = Arrays.asList(type.getImplementedInterfaces()); if (superInterfaces.contains(cssResourceType)) { return true; } JClassType superClass = type.getSuperclass(); if (superClass != null) { if (derivedFromCssResource(superClass, cssResourceType)) { return true; } } for (JClassType superInterface : superInterfaces) { if (derivedFromCssResource(superInterface, cssResourceType)) { return true; } } return false; }
/** * Returns the depth of the given class in the class hierarchy (where the * depth of java.lang.Object == 0). */ private int getDepth(JClassType clazz) { int depth = 0; while ((clazz = clazz.getSuperclass()) != null) { depth++; } return depth; }
/** * Returns the depth of the given class in the class hierarchy (where the * depth of java.lang.Object == 0). */ private int getDepth(JClassType clazz) { int depth = 0; while ((clazz = clazz.getSuperclass()) != null) { depth++; } return depth; }
private boolean isAssignableFrom(JClassType type, Class<?> clazz) { if (type.getQualifiedSourceName().equals(clazz.getName())) { return true; } if (type.getSuperclass() == null) { return false; } return this.isAssignableFrom(type.getSuperclass(), clazz); }
private boolean isAssignableFrom(JClassType type, Class<?> clazz) { if (type.getQualifiedSourceName().equals(clazz.getName())) { return true; } if (type.getSuperclass() == null) { return false; } return this.isAssignableFrom(type.getSuperclass(), clazz); }
private BindingComponent getBindingComponent(JClassType classType) throws UnableToCompleteException { BindingComponent bindingComponent = BindingCreatorFactory.getBindingComponent(classType); if (bindingComponent != null) { return bindingComponent; } classType = classType.getSuperclass(); if (classType != null) { return getBindingComponent(classType); } return null; }
private JMethod findRecursiveMethod(final JClassType pjclass, final String pasGetter, final JType[] pnoArgs) { if (pjclass == null || pasGetter == null) { return null; } final JMethod method = pjclass.findMethod(pasGetter, pnoArgs); if (method == null) { return findRecursiveMethod(pjclass.getSuperclass(), pasGetter, pnoArgs); } return method; }
private JField findRecursiveField(final JClassType pjclass, final String ppropertyName) { if (pjclass == null || ppropertyName == null) { return null; } final JField field = pjclass.findField(ppropertyName); if (field == null) { return findRecursiveField(pjclass.getSuperclass(), ppropertyName); } return field; }
protected void addSetters(JClassType cls, List<JMethod> methods) { if (cls.getSuperclass() != null) { addSetters(cls.getSuperclass(), methods); } for (JMethod m : cls.getMethods()) { if (m.isPublic() || m.isProtected()) { String name = m.getName(); if (name.matches("set.*") && m.getParameters().length == 1) { methods.add(m); } } } }
@Override public MetaClass getSuperClass() { JClassType type = getEnclosedMetaObject().isClassOrInterface(); if (type == null) { return null; } type = type.getSuperclass(); if (type == null) { return null; } return newInstance(oracle, type); }
private static JClassType findScopeClass(JClassType type,AngularGwtTypes types) { for (JClassType cType : type.getSuperclass().isParameterized().getTypeArgs()) { if (isScope(cType, types)) { return cType; } } return null; }
@Override public MetaClass getSuperClass() { JClassType type = getEnclosedMetaObject().isClassOrInterface(); if (type == null) { return null; } type = type.getSuperclass(); if (type == null) { return null; } return newInstance(oracle, type); }
private static Iterable<JMethod> getTestMethods(JClassType requestedClass) { Map<String, JMethod> methodMap = new HashMap<String, JMethod>(); for (JClassType cls = requestedClass; cls != null; cls = cls.getSuperclass()) { for (JMethod declMethod : cls.getMethods()) { if (isJUnitTestMethod(declMethod)) { putIfAbsent(methodMap, declMethod); } } } return methodMap.values(); }
private static JClassType findImplementingTypeForMethod(JClassType type, JMethod method) { JType[] methodParamTypes = method.getErasedParameterTypes(); while (type != null) { for (JMethod candidate : type.getMethods()) { if (hasMatchingErasedSignature(method, methodParamTypes, candidate)) { return type; } } type = type.getSuperclass(); } return null; }
private static Iterable<JMethod> getTestMethods(JClassType requestedClass) { Map<String, JMethod> methodMap = new HashMap<String, JMethod>(); for (JClassType cls = requestedClass; cls != null; cls = cls.getSuperclass()) { for (JMethod declMethod : cls.getMethods()) { if (isJUnitTestMethod(declMethod)) { putIfAbsent(methodMap, declMethod); } } } return methodMap.values(); }
private static JClassType findImplementingTypeForMethod(JClassType type, JMethod method) { JType[] methodParamTypes = method.getErasedParameterTypes(); while (type != null) { for (JMethod candidate : type.getMethods()) { if (hasMatchingErasedSignature(method, methodParamTypes, candidate)) { return type; } } type = type.getSuperclass(); } return null; }