Example usage for org.eclipse.jdt.internal.compiler.lookup SourceTypeBinding faultInTypesForFieldsAndMethods

List of usage examples for org.eclipse.jdt.internal.compiler.lookup SourceTypeBinding faultInTypesForFieldsAndMethods

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup SourceTypeBinding faultInTypesForFieldsAndMethods.

Prototype

void faultInTypesForFieldsAndMethods() 

Source Link

Usage

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies.java

License:Open Source License

/**
  * Doing fault in types here and not via CompilationUnitScope
  * allows us to process single types without processing the whole
  * compilation unit!/*from  www  .  j a v a2s .  c  om*/
  * We also add some OT-specific transformantions:
  * - faultInRoleImports
  * - evaluateLateAttributes
 */
private static boolean establishFaultInTypes(TypeModel clazz) {
    TypeDeclaration ast = clazz.getAst();
    if (ast != null && ast.scope != null) {
        ast.scope.compilationUnitScope().faultInImports();
        SourceTypeBinding typeBinding = ast.binding;
        typeBinding.faultInTypesForFieldsAndMethods();
        faultInRoleImports(ast);
    }
    // more attributes after fields and methods are in place (CallXXMethodMappingAttribute)
    if (clazz.getBinding() != null) {
        ModelElement.evaluateLateAttributes(clazz.getBinding(), STATE_FAULT_IN_TYPES);
    } else {
        assert ast != null && ast.hasErrors();
    }

    clazz.setState(STATE_FAULT_IN_TYPES);
    clazz.setMemberState(STATE_FAULT_IN_TYPES);
    return true;
}