use of com.redhat.ceylon.model.loader.mirror.MethodMirror in project ceylon-compiler by ceylon.
the class AnnotationLoader method loadAnnotationConstructorDefaultedParameter.
private AnnotationTerm loadAnnotationConstructorDefaultedParameter(LazyFunction method, MethodMirror meth, Parameter ctorParam, AnnotationConstructorParameter acp) {
// Find the method mirror for the DPM
for (MethodMirror mm : method.classMirror.getDirectMethods()) {
if (mm.getName().equals(Naming.getDefaultedParamMethodName(method, ctorParam))) {
// Create the appropriate AnnotationTerm
if (mm.getAnnotation(AbstractModelLoader.CEYLON_ANNOTATION_INSTANTIATION_ANNOTATION) != null) {
// If the DPM has a @AnnotationInstantiation
// then it must be an invocation term so recurse
InvocationAnnotationTerm invocationTerm = new InvocationAnnotationTerm();
invocationTerm.setInstantiation(loadAnnotationInvocation(method, mm, meth));
return invocationTerm;
} else {
return loadLiteralAnnotationTerm(method, ctorParam, mm);
}
}
}
return null;
}
use of com.redhat.ceylon.model.loader.mirror.MethodMirror in project ceylon-compiler by ceylon.
the class JavacClass method getDirectMethods.
@Override
public List<MethodMirror> getDirectMethods() {
if (methods == null) {
List<MethodMirror> ret = new LinkedList<MethodMirror>();
for (Symbol sym : classSymbol.getEnclosedElements()) {
if (sym instanceof MethodSymbol && (sym.flags() & Flags.PRIVATE) == 0) {
ret.add(new JavacMethod(this, (MethodSymbol) sym));
}
}
methods = Collections.unmodifiableList(ret);
}
return methods;
}
Aggregations