Java Code Examples for com.sun.tools.javac.util.Assert#checkNull()

The following examples show how to use com.sun.tools.javac.util.Assert#checkNull() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Modules.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public void initModules(List<JCCompilationUnit> trees) {
    Assert.check(!inInitModules);
    try {
        inInitModules = true;
        Assert.checkNull(rootModules);
        enter(trees, modules -> {
            Assert.checkNull(rootModules);
            Assert.checkNull(allModules);
            this.rootModules = modules;
            setupAllModules(); //initialize the module graph
            Assert.checkNonNull(allModules);
            inInitModules = false;
        }, null);
    } finally {
        inInitModules = false;
    }
}
 
Example 2
Source File: Modules.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void initModules(List<JCCompilationUnit> trees) {
    Assert.check(!inInitModules);
    try {
        inInitModules = true;
        Assert.checkNull(rootModules);
        enter(trees, modules -> {
            Assert.checkNull(rootModules);
            Assert.checkNull(allModules);
            this.rootModules = modules;
            setupAllModules(); //initialize the module graph
            Assert.checkNonNull(allModules);
            inInitModules = false;
        }, null);
    } finally {
        inInitModules = false;
    }
}
 
Example 3
Source File: StringConcat.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void appendString(JCTree tree) {
    Type t = tree.type.baseType();
    if (!t.isPrimitive() && t.tsym != syms.stringType.tsym) {
        t = syms.objectType;
    }

    Assert.checkNull(t.constValue());
    Symbol method = sbAppends.get(t);
    if (method == null) {
        method = rs.resolveInternalMethod(tree.pos(), gen.getAttrEnv(), syms.stringBuilderType, names.append, List.of(t), null);
        sbAppends.put(t, method);
    }

    gen.getItems().makeMemberItem(method, false).invoke();
}
 
Example 4
Source File: JavacProcessingEnvironment.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 5
Source File: JavacProcessingEnvironment.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 6
Source File: JavacProcessingEnvironment.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 7
Source File: JavacProcessingEnvironment.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(processors);
}
 
Example 8
Source File: Annotate.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void setRepeatable(Compound repeatable) {
    Assert.checkNull(this.repeatable);
    this.repeatable = repeatable;
}
 
Example 9
Source File: Annotate.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void setTarget(Compound target) {
    Assert.checkNull(this.target);
        this.target = target;
}
 
Example 10
Source File: JavacProcessingEnvironment.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 11
Source File: JavacProcessingEnvironment.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(processors);
}
 
Example 12
Source File: JavacProcessingEnvironment.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 13
Source File: JavacProcessingEnvironment.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}
 
Example 14
Source File: JavacProcessingEnvironment.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setProcessors(Iterable<? extends Processor> processors) {
    Assert.checkNull(discoveredProcs);
    initProcessorIterator(context, processors);
}