org.eclipse.jdt.internal.core.util.Util.toCharArrays()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.6k)|赞(0)|评价(0)|浏览(183)

本文整理了Java中org.eclipse.jdt.internal.core.util.Util.toCharArrays()方法的一些代码示例,展示了Util.toCharArrays()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.toCharArrays()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
方法名:toCharArrays

Util.toCharArrays介绍

[英]Converts a String[] to char[][].
[中]将字符串[]转换为字符[]。

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
@Override
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getPackageName()
 */
public char[][] getPackageName() {
  PackageFragment packageFragment = (PackageFragment) getParent();
  if (packageFragment == null) return CharOperation.NO_CHAR_CHAR;
  return Util.toCharArrays(packageFragment.names);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

fileName = newFileName;
  sourceUnit = new BasicCompilationUnit(sourceString.toCharArray(), Util.toCharArrays(packageFragment.names), new String(fileName), this.project);
} catch(JavaModelException e) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

fileName = newFileName;
  sourceUnit = new BasicCompilationUnit(sourceString.toCharArray(), Util.toCharArrays(packageFragment.names), new String(fileName), this.project);
} catch(JavaModelException e) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Convert a binary type into an AST type declaration and put it in the given compilation unit.
 */
public TypeDeclaration buildTypeDeclaration(IType type, CompilationUnitDeclaration compilationUnit)  throws JavaModelException {
  PackageFragment pkg = (PackageFragment) type.getPackageFragment();
  char[][] packageName = Util.toCharArrays(pkg.names);
  if (packageName.length > 0) {
    compilationUnit.currentPackage = new ImportReference(packageName, new long[]{0}, false, ClassFileConstants.AccDefault);
  }
  /* convert type */
  TypeDeclaration typeDeclaration = convert(type, null, null);
  IType alreadyComputedMember = type;
  IType parent = type.getDeclaringType();
  TypeDeclaration previousDeclaration = typeDeclaration;
  while(parent != null) {
    TypeDeclaration declaration = convert(parent, alreadyComputedMember, previousDeclaration);
    alreadyComputedMember = parent;
    previousDeclaration = declaration;
    parent = parent.getDeclaringType();
  }
  compilationUnit.types = new TypeDeclaration[]{previousDeclaration};
  return typeDeclaration;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

char[] typeQualifiedName = focusType.getTypeQualifiedName('.').toCharArray();
String[] packageName = ((PackageFragment) focusType.getPackageFragment()).names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

char[] typeQualifiedName = focusType.getTypeQualifiedName('.').toCharArray();
String[] packageName = ((PackageFragment) focusType.getPackageFragment()).names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

char[] typeQualifiedName = focusType.getTypeQualifiedName('.').toCharArray();
String[] packageName = ((PackageFragment) focusType.getPackageFragment()).names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

char[] typeQualifiedName = focusType.getTypeQualifiedName('.').toCharArray();
String[] packageName = ((PackageFragment) focusType.getPackageFragment()).names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

PackageFragment fragment = (PackageFragment) focusType.getPackageFragment();
String[] packageName = fragment.names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

PackageFragment fragment = (PackageFragment) focusType.getPackageFragment();
String[] packageName = fragment.names;
if (searchableEnvironment.findType(typeQualifiedName, Util.toCharArrays(packageName)) == null) {

相关文章

Util类方法