public static Collection<DeclaredType> collectInterfaces(TypeElement type) { @SuppressWarnings({"unchecked"}) Collection<DeclaredType> interfaces = (Collection<DeclaredType>) type.getInterfaces(); for (TypeMirror interfaceType : type.getInterfaces()) { interfaces.addAll(collectInterfaces(getDeclaration(interfaceType))); } return interfaces; }
public static Collection<DeclaredType> collectInterfaces(TypeElement type) { @SuppressWarnings({"unchecked"}) Collection<DeclaredType> interfaces = (Collection<DeclaredType>) type.getInterfaces(); for (TypeMirror interfaceType : type.getInterfaces()) { interfaces.addAll(collectInterfaces(getDeclaration(interfaceType))); } return interfaces; }
public static Collection<DeclaredType> collectInterfaces(TypeElement type) { @SuppressWarnings({"unchecked"}) Collection<DeclaredType> interfaces = (Collection<DeclaredType>) type.getInterfaces(); for (TypeMirror interfaceType : type.getInterfaces()) { interfaces.addAll(collectInterfaces(getDeclaration(interfaceType))); } return interfaces; }
public static TypeElement getDeclaringClassMethod(TypeMirror theClass, String methodName, TypeMirror[] args) { return getDeclaringClassMethod(getDeclaration(theClass), methodName, args); }
public static Collection<DeclaredType> collectInterfaces(TypeElement type) { @SuppressWarnings({"unchecked"}) Collection<DeclaredType> interfaces = (Collection<DeclaredType>) type.getInterfaces(); for (TypeMirror interfaceType : type.getInterfaces()) { interfaces.addAll(collectInterfaces(getDeclaration(interfaceType))); } return interfaces; }
public static VariableElement getValueMember(TypeMirror classType) { return getValueMember(getDeclaration(classType)); }
public static VariableElement getValueMember(TypeMirror classType) { return getValueMember(getDeclaration(classType)); }
public static TypeElement getDeclaringClassMethod(TypeMirror theClass, String methodName, TypeMirror[] args) { return getDeclaringClassMethod(getDeclaration(theClass), methodName, args); }
public static VariableElement getValueMember(TypeMirror classType) { return getValueMember(getDeclaration(classType)); }
public static TypeElement getDeclaringClassMethod(TypeMirror theClass, String methodName, TypeMirror[] args) { return getDeclaringClassMethod(getDeclaration(theClass), methodName, args); }
public static TypeElement getDeclaringClassMethod(TypeMirror theClass, String methodName, TypeMirror[] args) { return getDeclaringClassMethod(getDeclaration(theClass), methodName, args); }
public static VariableElement getValueMember(TypeMirror classType) { return getValueMember(getDeclaration(classType)); }
public static TypeMirror getHolderValueType(TypeMirror type, TypeElement defHolder, ProcessingEnvironment env) { TypeElement typeElement = getDeclaration(type); if (typeElement == null) return null; if (isSubElement(typeElement, defHolder)) { if (type.getKind().equals(TypeKind.DECLARED)) { Collection<? extends TypeMirror> argTypes = ((DeclaredType) type).getTypeArguments(); if (argTypes.size() == 1) { return argTypes.iterator().next(); } else if (argTypes.isEmpty()) { VariableElement member = getValueMember(typeElement); if (member != null) { return member.asType(); } } } } return null; }
public static TypeMirror getHolderValueType(TypeMirror type, TypeElement defHolder, ProcessingEnvironment env) { TypeElement typeElement = getDeclaration(type); if (typeElement == null) return null; if (isSubElement(typeElement, defHolder)) { if (type.getKind().equals(TypeKind.DECLARED)) { Collection<? extends TypeMirror> argTypes = ((DeclaredType) type).getTypeArguments(); if (argTypes.size() == 1) { return argTypes.iterator().next(); } else if (argTypes.isEmpty()) { VariableElement member = getValueMember(typeElement); if (member != null) { return member.asType(); } } } } return null; }
public static TypeMirror getHolderValueType(TypeMirror type, TypeElement defHolder, ProcessingEnvironment env) { TypeElement typeElement = getDeclaration(type); if (typeElement == null) return null; if (isSubElement(typeElement, defHolder)) { if (type.getKind().equals(TypeKind.DECLARED)) { Collection<? extends TypeMirror> argTypes = ((DeclaredType) type).getTypeArguments(); if (argTypes.size() == 1) { return argTypes.iterator().next(); } else if (argTypes.isEmpty()) { VariableElement member = getValueMember(typeElement); if (member != null) { return member.asType(); } } } } return null; }
public static TypeMirror getHolderValueType(TypeMirror type, TypeElement defHolder, ProcessingEnvironment env) { TypeElement typeElement = getDeclaration(type); if (typeElement == null) return null; if (isSubElement(typeElement, defHolder)) { if (type.getKind().equals(TypeKind.DECLARED)) { Collection<? extends TypeMirror> argTypes = ((DeclaredType) type).getTypeArguments(); if (argTypes.size() == 1) { return argTypes.iterator().next(); } else if (argTypes.isEmpty()) { VariableElement member = getValueMember(typeElement); if (member != null) { return member.asType(); } } } } return null; }