Skip to content

Commit

Permalink
#63 : added caching of delegate methods
Browse files Browse the repository at this point in the history
  • Loading branch information
timowest committed Dec 11, 2011
1 parent e1fdad6 commit 80c5d0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Expand Up @@ -368,13 +368,16 @@ private void processDelegateMethods() {
TypeElement parent = (TypeElement)element.getEnclosingElement();
// replace with element from current session
parent = processingEnv.getElementUtils().getTypeElement(parent.getQualifiedName().toString());
for (Element child : parent.getEnclosedElements()) {
if (child.getKind() == element.getKind() && child.getSimpleName().equals(element.getSimpleName())) {
elements.add(child);
}
}
if (parent != null) {
for (Element child : parent.getEnclosedElements()) {
if (child.getKind() == element.getKind() && child.getSimpleName().equals(element.getSimpleName())) {
elements.add(child);
}
}
}
}

delegateMethods.clear();
delegateMethods.addAll(elements);

for (Element delegateMethod : elements) {
ExecutableElement method = (ExecutableElement)delegateMethod;
Expand Down
Expand Up @@ -92,7 +92,7 @@ import com.mysema.query.annotations.Config;
<emphasis>querydsl.mapAccessors</emphasis> to enable accessors for direct key based map access,
<emphasis>querydsl.prefix</emphasis> to override the prefix for query types(default: Q),
<emphasis>querydsl.suffix</emphasis> to set a suffix for query types,
<emphasis>querydsl.packagePrefix</emphasis> to set a suffix for query type packages,
<emphasis>querydsl.packageSuffix</emphasis> to set a suffix for query type packages,
<emphasis>querydsl.createDefaultVariable</emphasis> to set whether default variables are created.
</para>

Expand Down

0 comments on commit 80c5d0d

Please sign in to comment.