当前位置: 首页>>代码示例>>Java>>正文


Java ClassDeclaration.getQualifiedName方法代码示例

本文整理汇总了Java中org.eclipse.xtend.lib.macro.declaration.ClassDeclaration.getQualifiedName方法的典型用法代码示例。如果您正苦于以下问题:Java ClassDeclaration.getQualifiedName方法的具体用法?Java ClassDeclaration.getQualifiedName怎么用?Java ClassDeclaration.getQualifiedName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtend.lib.macro.declaration.ClassDeclaration的用法示例。


在下文中一共展示了ClassDeclaration.getQualifiedName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAdapterClassName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public String getAdapterClassName(final ClassDeclaration declaration) {
  String _qualifiedName = declaration.getQualifiedName();
  String _plus = (_qualifiedName + ".");
  String _simpleName = declaration.getSimpleName();
  String _plus_1 = (_plus + _simpleName);
  return (_plus_1 + "Adapter");
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:8,代码来源:EmfAdaptableProcessor.java

示例2: packageName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public static String packageName(final ClassDeclaration cls) {
  String _xblockexpression = null;
  {
    String _qualifiedName = cls.getQualifiedName();
    final String[] parts = _qualifiedName.split("\\.");
    int _size = ((List<String>)Conversions.doWrapArray(parts)).size();
    int _minus = (_size - 1);
    Iterable<String> _take = IterableExtensions.<String>take(((Iterable<String>)Conversions.doWrapArray(parts)), _minus);
    _xblockexpression = IterableExtensions.join(_take, ".");
  }
  return _xblockexpression;
}
 
开发者ID:East196,项目名称:maker,代码行数:13,代码来源:CommonQueries.java

示例3: packageName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public static String packageName(final ClassDeclaration cls) {
  String _xblockexpression = null;
  {
    String _qualifiedName = cls.getQualifiedName();
    final String[] parts = _qualifiedName.split("\\.");
    int _size = ((List<String>)Conversions.doWrapArray(parts)).size();
    int _minus = (_size - 1);
    Iterable<String> _take = IterableExtensions.<String>take(((Iterable<String>)Conversions.doWrapArray(parts)), _minus);
    String _join = IterableExtensions.join(_take, ".");
    _xblockexpression = (_join);
  }
  return _xblockexpression;
}
 
开发者ID:damien-cremilleux,项目名称:TP4INFO,代码行数:14,代码来源:ASTExtensions.java

示例4: doRegisterGlobals

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public void doRegisterGlobals(final ClassDeclaration annotatedClass, final RegisterGlobalsContext context) {
  try {
    Iterable<? extends AnnotationReference> _annotations = annotatedClass.getAnnotations();
    final Function1<AnnotationReference,Boolean> _function = new Function1<AnnotationReference,Boolean>() {
      public Boolean apply(final AnnotationReference it) {
        Object _value = it.getValue("className");
        boolean _notEquals = (!Objects.equal(_value, null));
        return Boolean.valueOf(_notEquals);
      }
    };
    AnnotationReference _findFirst = IterableExtensions.findFirst(_annotations, _function);
    Object classNam = _findFirst.getValue("className");
    Class<? extends Object> _class = classNam.getClass();
    Method _method = _class.getMethod("getSimpleName");
    Object _invoke = _method.invoke(classNam);
    final String className = ((String) _invoke);
    String _qualifiedName = annotatedClass.getQualifiedName();
    String _plus = (_qualifiedName + className);
    String _plus_1 = (_plus + "AspectProperties");
    context.registerClass(_plus_1);
    String _qualifiedName_1 = annotatedClass.getQualifiedName();
    String _plus_2 = (_qualifiedName_1 + className);
    String _plus_3 = (_plus_2 + "AspectContext");
    context.registerClass(_plus_3);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:damien-cremilleux,项目名称:TP4INFO,代码行数:29,代码来源:AspectProcessor.java

示例5: builderClassName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public String builderClassName(final ClassDeclaration cls) {
  String _qualifiedName = cls.getQualifiedName();
  return (_qualifiedName + "Builder");
}
 
开发者ID:East196,项目名称:maker,代码行数:5,代码来源:ValueObjectProcessor.java

示例6: getInterfaceName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public String getInterfaceName(final ClassDeclaration annotatedClass) {
  String _qualifiedName = annotatedClass.getQualifiedName();
  return (_qualifiedName + "Interface");
}
 
开发者ID:East196,项目名称:maker,代码行数:5,代码来源:ExtractCompilationParticipant.java

示例7: className

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
private String className(final ClassDeclaration annotatedClass) {
  String _qualifiedName = annotatedClass.getQualifiedName();
  return (_qualifiedName + "Builder");
}
 
开发者ID:CymricNPG,项目名称:abattle,代码行数:5,代码来源:TransferDataProcessor.java

示例8: className

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public String className(final ClassDeclaration annotatedClass) {
  String _qualifiedName = annotatedClass.getQualifiedName();
  return _qualifiedName.replace("Impl", "Factory");
}
 
开发者ID:CymricNPG,项目名称:abattle,代码行数:5,代码来源:FactoryProcessor.java

示例9: builderClassName

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
public String builderClassName(final ClassDeclaration cls) {
  String _qualifiedName = cls.getQualifiedName();
  String _plus = (_qualifiedName + "Builder");
  return _plus;
}
 
开发者ID:damien-cremilleux,项目名称:TP4INFO,代码行数:6,代码来源:ValueObjectProcessor.java

示例10: doGenerateCode

import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; //导入方法依赖的package包/类
/**
 * use an additional code generator to produce the .k3_aspect_mapping.properties file
 */
public void doGenerateCode(final List<? extends ClassDeclaration> annotatedSourceElements, @Extension final CodeGenerationContext context) {
  try {
    int _size = annotatedSourceElements.size();
    boolean _greaterThan = (_size > 0);
    if (_greaterThan) {
      ClassDeclaration _get = annotatedSourceElements.get(0);
      CompilationUnit _compilationUnit = _get.getCompilationUnit();
      final Path filePath = _compilationUnit.getFilePath();
      Path _projectFolder = context.getProjectFolder(filePath);
      _projectFolder.getLastSegment();
      Path _projectFolder_1 = context.getProjectFolder(filePath);
      Path _projectFolder_2 = context.getProjectFolder(filePath);
      String _lastSegment = _projectFolder_2.getLastSegment();
      String _plus = ("/META-INF/xtend-gen/" + _lastSegment);
      String _plus_1 = (_plus + ".k3_aspect_mapping.properties");
      final Path file = _projectFolder_1.append(_plus_1);
      context.delete(file);
    }
    for (final ClassDeclaration clazz : annotatedSourceElements) {
      {
        CompilationUnit _compilationUnit_1 = clazz.getCompilationUnit();
        final Path filePath_1 = _compilationUnit_1.getFilePath();
        Path _projectFolder_3 = context.getProjectFolder(filePath_1);
        _projectFolder_3.getLastSegment();
        Path _projectFolder_4 = context.getProjectFolder(filePath_1);
        Path _projectFolder_5 = context.getProjectFolder(filePath_1);
        String _lastSegment_1 = _projectFolder_5.getLastSegment();
        String _plus_2 = ("/META-INF/xtend-gen/" + _lastSegment_1);
        String _plus_3 = (_plus_2 + ".k3_aspect_mapping.properties");
        final Path file_1 = _projectFolder_4.append(_plus_3);
        Iterable<? extends AnnotationReference> _annotations = clazz.getAnnotations();
        final Function1<AnnotationReference,Boolean> _function = new Function1<AnnotationReference,Boolean>() {
          public Boolean apply(final AnnotationReference it) {
            Object _value = it.getValue("className");
            boolean _notEquals = (!Objects.equal(_value, null));
            return Boolean.valueOf(_notEquals);
          }
        };
        AnnotationReference _findFirst = IterableExtensions.findFirst(_annotations, _function);
        final Object aspectizedclassNam = _findFirst.getValue("className");
        Class<? extends Object> _class = aspectizedclassNam.getClass();
        Method _method = _class.getMethod("getQualifiedName");
        Object _invoke = _method.invoke(aspectizedclassNam);
        final String aspectizedclassName = ((String) _invoke);
        boolean _exists = context.exists(file_1);
        if (_exists) {
          StringConcatenation _builder = new StringConcatenation();
          CharSequence _contents = context.getContents(file_1);
          _builder.append(_contents, "");
          _builder.newLineIfNotEmpty();
          _builder.append(aspectizedclassName, "");
          _builder.append(" = ");
          String _qualifiedName = clazz.getQualifiedName();
          _builder.append(_qualifiedName, "");
          _builder.newLineIfNotEmpty();
          context.setContents(file_1, _builder);
        } else {
          StringConcatenation _builder_1 = new StringConcatenation();
          _builder_1.append(aspectizedclassName, "");
          _builder_1.append(" = ");
          String _qualifiedName_1 = clazz.getQualifiedName();
          _builder_1.append(_qualifiedName_1, "");
          _builder_1.newLineIfNotEmpty();
          context.setContents(file_1, _builder_1);
        }
      }
    }
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:damien-cremilleux,项目名称:TP4INFO,代码行数:75,代码来源:AspectProcessor.java


注:本文中的org.eclipse.xtend.lib.macro.declaration.ClassDeclaration.getQualifiedName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。