com.sun.mirror.declaration.Declaration.getSimpleName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(118)

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

Declaration.getSimpleName介绍

暂无

代码示例

代码示例来源:origin: org.apache.vysper/spec-compliance

public String getMember() {
  if (declaration instanceof FieldDeclaration || declaration instanceof MethodDeclaration) {
    MemberDeclaration memberDeclaration = (MemberDeclaration) declaration;
    return declaration.getSimpleName();
  } else {
    return null;
  }
}

代码示例来源:origin: net.sf.apt-jelly/apt-jelly-core

public String getSimpleName() {
 return delegate.getSimpleName();
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

private String toString(Declaration declaration) {
 StringBuilder builder = new StringBuilder();
 if (declaration instanceof TypeDeclaration) {
  builder.append(((TypeDeclaration) declaration).getQualifiedName());
 }
 else if (declaration instanceof MemberDeclaration) {
  if (((MemberDeclaration) declaration).getDeclaringType() != null) {
   builder.append(((MemberDeclaration) declaration).getDeclaringType().getQualifiedName());
   builder.append('.');
  }
  builder.append(declaration.getSimpleName());
 }
 else if (declaration instanceof ParameterDeclaration) {
  builder.append("Parameter ").append(declaration.getSimpleName());
 }
 else {
  builder.append(declaration.getSimpleName());
 }
 return builder.toString();
}

代码示例来源:origin: org.apache.vysper/spec-compliance

public String getClassName() {
  if (declaration instanceof FieldDeclaration || declaration instanceof MethodDeclaration) {
    MemberDeclaration memberDeclaration = (MemberDeclaration) declaration;
    return memberDeclaration.getDeclaringType().getQualifiedName();
  } else {
    return declaration.getSimpleName();
  }
}

代码示例来源:origin: org.apache.vysper/spec-compliance

public String getFQClassName() {
  if (declaration instanceof FieldDeclaration || declaration instanceof MethodDeclaration) {
    MemberDeclaration memberDeclaration = (MemberDeclaration) declaration;
    return memberDeclaration.getDeclaringType().getQualifiedName();
  } else if (declaration instanceof ClassDeclaration) {
    ClassDeclaration classDeclaration = (ClassDeclaration) declaration;
    return classDeclaration.getPackage() + "." + classDeclaration.getSimpleName();
  } else {
    return declaration.getSimpleName();
  }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

org.codehaus.enunciate.Facet facet = declaration.getAnnotation(org.codehaus.enunciate.Facet.class);
if (facet != null) {
 bucket.add(new Facet(facet, declaration.getSimpleName()));
  bucket.add(new Facet(f, declaration.getSimpleName()));

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

throw new ValidationException(referer.getPosition(), referer.getSimpleName() + ": adapter " + adapterTypeMirror.getDeclaration().getQualifiedName() + " does not adapt " + unwrappedAdaptedType);

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

EnunciateConfiguration config = ((EnunciateFreemarkerModel) FreemarkerModel.get()).getEnunciateConfig();
if (config != null && config.getCustomResourceParameterAnnotations().contains(fqn)) {
 parameterName = declaration.getSimpleName();
 typeName = decl.getSimpleName().toLowerCase().replaceAll("param", "");
 break;

相关文章