return;
}
// Class(args)
if (element1 instanceof ClassElement) {
ClassElement classElement = (ClassElement) element1;
constructor = new InterfaceTypeImpl(classElement).lookUpConstructor(null, definingLibrary);
}
}
//
// prefix.CONST or prefix.Class() or Class.CONST or Class.constructor(args)
//
if (nameNode1 != null && nameNode2 != null && nameNode3 == null) {
Element element1 = nameNode1.getStaticElement();
Element element2 = nameNode2.getStaticElement();
// Class.CONST - not resolved yet
if (element1 instanceof ClassElement) {
ClassElement classElement = (ClassElement) element1;
element2 = classElement.lookUpGetter(nameNode2.getName(), definingLibrary);
}
// prefix.CONST or Class.CONST
if (element2 instanceof PropertyAccessorElement) {
nameNode2.setStaticElement(element2);
annotation.setElement(element2);
resolveAnnotationElementGetter(annotation, (PropertyAccessorElement) element2);
return;
}
// prefix.Class()
if (element2 instanceof ClassElement) {
ClassElement classElement = (ClassElement) element2;
constructor = classElement.getUnnamedConstructor();
}
// Class.constructor(args)
if (element1 instanceof ClassElement) {
ClassElement classElement = (ClassElement) element1;
constructor = new InterfaceTypeImpl(classElement).lookUpConstructor(
nameNode2.getName(),
definingLibrary);
nameNode2.setStaticElement(constructor);
}
}
//
// prefix.Class.CONST or prefix.Class.constructor(args)
//
if (nameNode1 != null && nameNode2 != null && nameNode3 != null) {
Element element2 = nameNode2.getStaticElement();
// element2 should be ClassElement
if (element2 instanceof ClassElement) {
ClassElement classElement = (ClassElement) element2;
String name3 = nameNode3.getName();
// prefix.Class.CONST
PropertyAccessorElement getter = classElement.lookUpGetter(name3, definingLibrary);
if (getter != null) {
nameNode3.setStaticElement(getter);
annotation.setElement(element2);
resolveAnnotationElementGetter(annotation, getter);
return;
}
// prefix.Class.constructor(args)
constructor = new InterfaceTypeImpl(classElement).lookUpConstructor(name3, definingLibrary);
nameNode3.setStaticElement(constructor);
}
}
// we need constructor
if (constructor == null) {