本文整理了Java中org.eclipse.jdt.internal.core.util.Util.getJavaLikeExtensions()
方法的一些代码示例,展示了Util.getJavaLikeExtensions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getJavaLikeExtensions()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
方法名:getJavaLikeExtensions
[英]Returns the registered Java like extensions.
[中]返回注册的类Java扩展。
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns true if the given name ends with one of the known java like extension.
* (implementation is not creating extra strings)
*/
public final static boolean isJavaLikeFileName(char[] fileName) {
if (fileName == null) return false;
int fileNameLength = fileName.length;
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
if (extensionStart-1 < 0) continue;
if (fileName[extensionStart-1] != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName[extensionStart + j] != extension[j])
continue extensions;
}
return true;
}
return false;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* Returns true if the given name ends with one of the known java like extension.
* (implementation is not creating extra strings)
*/
public final static boolean isJavaLikeFileName(char[] fileName) {
if (fileName == null) return false;
int fileNameLength = fileName.length;
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
if (extensionStart-1 < 0) continue;
if (fileName[extensionStart-1] != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName[extensionStart + j] != extension[j])
continue extensions;
}
return true;
}
return false;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
/**
* Returns true if the given name ends with one of the known java like extension.
* (implementation is not creating extra strings)
*/
public final static boolean isJavaLikeFileName(char[] fileName) {
if (fileName == null) return false;
int fileNameLength = fileName.length;
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
if (extensionStart-1 < 0) continue;
if (fileName[extensionStart-1] != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName[extensionStart + j] != extension[j])
continue extensions;
}
return true;
}
return false;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Returns true if the given name ends with one of the known java like extension.
* (implementation is not creating extra strings)
*/
public final static boolean isJavaLikeFileName(char[] fileName) {
if (fileName == null) return false;
int fileNameLength = fileName.length;
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
if (extensionStart-1 < 0) continue;
if (fileName[extensionStart-1] != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName[extensionStart + j] != extension[j])
continue extensions;
}
return true;
}
return false;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public static int indexOfJavaLikeExtension(String fileName) {
int fileNameLength = fileName.length();
char[][] javaLikeExtensions = getJavaLikeExtensions();
extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] extension = javaLikeExtensions[i];
int extensionLength = extension.length;
int extensionStart = fileNameLength - extensionLength;
int dotIndex = extensionStart - 1;
if (dotIndex < 0) continue;
if (fileName.charAt(dotIndex) != '.') continue;
for (int j = 0; j < extensionLength; j++) {
if (fileName.charAt(extensionStart + j) != extension[j])
continue extensions;
}
return dotIndex;
}
return -1;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* <p>
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
* </p>
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* <p>
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
* </p>
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* <p>
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
* </p>
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* <p>
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
* </p>
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public static boolean equalsIgnoreJavaLikeExtension(String fileName, String string) {
int fileNameLength = fileName.length();
int stringLength = string.length();
if (fileNameLength < stringLength) return false;
for (int i = 0; i < stringLength; i ++) {
if (fileName.charAt(i) != string.charAt(i)) {
return false;
}
}
char[][] javaLikeExtensions = getJavaLikeExtensions();
suffixes: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] suffix = javaLikeExtensions[i];
int extensionStart = stringLength+1;
if (extensionStart + suffix.length != fileNameLength) continue;
if (fileName.charAt(stringLength) != '.') continue;
for (int j = extensionStart; j < fileNameLength; j++) {
if (fileName.charAt(j) != suffix[j-extensionStart])
continue suffixes;
}
return true;
}
return false;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public static boolean equalsIgnoreJavaLikeExtension(String fileName, String string) {
int fileNameLength = fileName.length();
int stringLength = string.length();
if (fileNameLength < stringLength) return false;
for (int i = 0; i < stringLength; i ++) {
if (fileName.charAt(i) != string.charAt(i)) {
return false;
}
}
char[][] javaLikeExtensions = getJavaLikeExtensions();
suffixes: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] suffix = javaLikeExtensions[i];
int extensionStart = stringLength+1;
if (extensionStart + suffix.length != fileNameLength) continue;
if (fileName.charAt(stringLength) != '.') continue;
for (int j = extensionStart; j < fileNameLength; j++) {
if (fileName.charAt(j) != suffix[j-extensionStart])
continue suffixes;
}
return true;
}
return false;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* Returns the list of known Java-like extensions.
* Java like extension are defined in the {@link org.eclipse.core.runtime.Platform#getContentTypeManager()
* content type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}.
* <p>
* Note that a Java-like extension doesn't include the leading dot ('.').
* Also note that the "java" extension is always defined as a Java-like extension.
* </p>
*
* @return the list of known Java-like extensions.
* @since 3.2
*/
public static String[] getJavaLikeExtensions() {
return CharOperation.toStrings(Util.getJavaLikeExtensions());
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public static boolean equalsIgnoreJavaLikeExtension(String fileName, String string) {
int fileNameLength = fileName.length();
int stringLength = string.length();
if (fileNameLength < stringLength) return false;
for (int i = 0; i < stringLength; i ++) {
if (fileName.charAt(i) != string.charAt(i)) {
return false;
}
}
char[][] javaLikeExtensions = getJavaLikeExtensions();
suffixes: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) {
char[] suffix = javaLikeExtensions[i];
int extensionStart = stringLength+1;
if (extensionStart + suffix.length != fileNameLength) continue;
if (fileName.charAt(stringLength) != '.') continue;
for (int j = extensionStart; j < fileNameLength; j++) {
if (fileName.charAt(j) != suffix[j-extensionStart])
continue suffixes;
}
return true;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!