use of org.eclipse.ceylon.model.loader.mirror.TypeMirror in project ceylon by eclipse.
the class AbstractModelLoader method isCoercedMethod.
private boolean isCoercedMethod(MethodMirror methodMirror) {
List<VariableMirror> parameters = methodMirror.getParameters();
for (int i = 0; i < parameters.size(); i++) {
VariableMirror param = parameters.get(i);
TypeMirror type = param.getType();
if (methodMirror.isVariadic() && i == parameters.size() - 1) {
type = type.getComponentType();
}
if (isCoercedType(type))
return true;
}
return false;
}
use of org.eclipse.ceylon.model.loader.mirror.TypeMirror in project ceylon by eclipse.
the class ReflectionClass method getInterfaces.
@Override
public List<TypeMirror> getInterfaces() {
if (interfaces != null)
return interfaces;
Type[] javaInterfaces = klass.getGenericInterfaces();
interfaces = new ArrayList<TypeMirror>(javaInterfaces.length);
for (Type javaInterface : javaInterfaces) interfaces.add(new ReflectionType(javaInterface));
return interfaces;
}
use of org.eclipse.ceylon.model.loader.mirror.TypeMirror in project ceylon by eclipse.
the class ReflectionTypeParameter method getBounds.
@Override
public List<TypeMirror> getBounds() {
if (bounds != null)
return bounds;
Type[] javaBounds = type.getBounds();
bounds = new ArrayList<TypeMirror>(javaBounds.length);
for (Type bound : javaBounds) bounds.add(new ReflectionType(bound));
return bounds;
}
Aggregations