mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
fix
This commit is contained in:
@@ -1 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5:${testdir}/../../../../stubs/jshell
|
||||
37
java/ql/test/stubs/jshell/jdk/jshell/JShell.java
Normal file
37
java/ql/test/stubs/jshell/jdk/jshell/JShell.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package jdk.jshell;
|
||||
|
||||
import java.util.List;
|
||||
import java.lang.IllegalStateException;
|
||||
|
||||
public class JShell implements AutoCloseable {
|
||||
|
||||
JShell(Builder b) throws IllegalStateException { }
|
||||
|
||||
public static class Builder {
|
||||
|
||||
Builder() { }
|
||||
|
||||
public JShell build() throws IllegalStateException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static JShell create() throws IllegalStateException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public SourceCodeAnalysis sourceCodeAnalysis() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<SnippetEvent> eval(String input) throws IllegalStateException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() { }
|
||||
}
|
||||
31
java/ql/test/stubs/jshell/jdk/jshell/Snippet.java
Normal file
31
java/ql/test/stubs/jshell/jdk/jshell/Snippet.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package jdk.jshell;
|
||||
|
||||
public abstract class Snippet {
|
||||
|
||||
public enum Kind {
|
||||
|
||||
IMPORT(true),
|
||||
|
||||
TYPE_DECL(true),
|
||||
|
||||
METHOD(true),
|
||||
|
||||
VAR(true),
|
||||
|
||||
EXPRESSION(false),
|
||||
|
||||
STATEMENT(false),
|
||||
|
||||
ERRONEOUS(false);
|
||||
|
||||
private final boolean isPersistent;
|
||||
|
||||
Kind(boolean isPersistent) {
|
||||
this.isPersistent = isPersistent;
|
||||
}
|
||||
|
||||
public boolean isPersistent() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java
Normal file
5
java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package jdk.jshell;
|
||||
|
||||
public class SnippetEvent {
|
||||
|
||||
}
|
||||
111
java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java
Normal file
111
java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java
Normal file
@@ -0,0 +1,111 @@
|
||||
package jdk.jshell;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class SourceCodeAnalysis {
|
||||
|
||||
public abstract CompletionInfo analyzeCompletion(String input);
|
||||
|
||||
public abstract List<Suggestion> completionSuggestions(String input, int cursor, int[] anchor);
|
||||
|
||||
public abstract List<Documentation> documentation(String input, int cursor, boolean computeJavadoc);
|
||||
|
||||
public abstract String analyzeType(String code, int cursor);
|
||||
|
||||
public abstract QualifiedNames listQualifiedNames(String code, int cursor);
|
||||
|
||||
public abstract SnippetWrapper wrapper(Snippet snippet);
|
||||
|
||||
public abstract List<SnippetWrapper> wrappers(String input);
|
||||
|
||||
public abstract Collection<Snippet> dependents(Snippet snippet);
|
||||
|
||||
SourceCodeAnalysis() {}
|
||||
|
||||
public interface CompletionInfo {
|
||||
|
||||
Completeness completeness();
|
||||
|
||||
String remaining();
|
||||
|
||||
String source();
|
||||
}
|
||||
|
||||
public enum Completeness {
|
||||
|
||||
COMPLETE(true),
|
||||
|
||||
COMPLETE_WITH_SEMI(true),
|
||||
|
||||
DEFINITELY_INCOMPLETE(false),
|
||||
|
||||
CONSIDERED_INCOMPLETE(false),
|
||||
|
||||
EMPTY(false),
|
||||
|
||||
UNKNOWN(true);
|
||||
|
||||
private final boolean isComplete;
|
||||
|
||||
Completeness(boolean isComplete) {
|
||||
this.isComplete = isComplete;
|
||||
}
|
||||
|
||||
public boolean isComplete() {
|
||||
return isComplete;
|
||||
}
|
||||
}
|
||||
|
||||
public interface Suggestion {
|
||||
|
||||
String continuation();
|
||||
|
||||
boolean matchesType();
|
||||
}
|
||||
|
||||
public interface Documentation {
|
||||
|
||||
String signature();
|
||||
|
||||
String javadoc();
|
||||
}
|
||||
|
||||
public static final class QualifiedNames {
|
||||
|
||||
|
||||
QualifiedNames(List<String> names, int simpleNameLength, boolean upToDate, boolean resolvable) { }
|
||||
|
||||
public List<String> getNames() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getSimpleNameLength() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isUpToDate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isResolvable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public interface SnippetWrapper {
|
||||
|
||||
String source();
|
||||
|
||||
String wrapped();
|
||||
|
||||
String fullClassName();
|
||||
|
||||
Snippet.Kind kind();
|
||||
|
||||
int sourceToWrappedPosition(int pos);
|
||||
|
||||
int wrappedToSourcePosition(int pos);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user