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


Java JavaClass.getName方法代码示例

本文整理汇总了Java中com.thoughtworks.qdox.model.JavaClass.getName方法的典型用法代码示例。如果您正苦于以下问题:Java JavaClass.getName方法的具体用法?Java JavaClass.getName怎么用?Java JavaClass.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.thoughtworks.qdox.model.JavaClass的用法示例。


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

示例1: getDomainName

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
 * Recupera o nome da entidade de domínio
 * 
 * @param templateRules
 * @param javaClass
 * @return
 * @throws GeradorException
 */
public String getDomainName(final JavaClass javaClass) throws GeradorException {
	
	if (javaClass != null) {
		
		String domainName;
		final String fileNamePattern = this.getProperties().get(FreemarkerTemplateRules.PROP_REGEX_DOMAIN_NAME_PATTERN);
		
		if (StringUtils.isEmpty(fileNamePattern)) {
			// filewriter.regexDomainNamePatternNotSpecified=A regex para determinar o nome do domínio ({0}) não foi espeficicada nas
			// configurações do gerador.
			// Verifique o arquivo ApplicationContext.xml!
			throw new TemplateRulesException(FreemarkerTemplateRules.mf.format("filewriter.regexDomainNamePatternNotSpecified",
					FreemarkerTemplateRules.PROP_REGEX_DOMAIN_NAME_PATTERN, javaClass.getName()));
		}
		
		final String className = javaClass.getName();
		
		domainName = className.replaceAll(fileNamePattern, FileWriterFactory.REGEX_GROUP1_REPLACEMENT);
		return domainName;
		
	} else {
		return null;
		
	}
	
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:35,代码来源:FreemarkerTemplateRules.java

示例2: getRegexSearcher

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
 * Cria um searcher baseado em regex
 * 
 * @param regexFilter
 * @return
 */
protected Searcher getRegexSearcher(final String regexFilter) {
	final Searcher searcher = new Searcher() {
		public boolean eval(final JavaClass cls) {
			final String nome = cls.getName();
			return nome.matches(regexFilter);
			// return true;
		}
	};
	return searcher;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:17,代码来源:DomainModelLoaderFactory.java

示例3: getDomainName

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
 * Recupera o nome da entidade de domínio
 * 
 * @param templateRules
 * @param javaClass
 * @return
 * @throws GeradorException
 */
public String getDomainName(final JavaClass javaClass) throws GeradorException {
	
	if (javaClass != null) {
		
		String domainName;
		final String fileNamePattern = this.getProperties().get(FreemarkerTemplateRules.PROP_REGEX_DOMAIN_NAME_PATTERN);
		
		if (StringUtils.isEmpty(fileNamePattern)) {
			// filewriter.regexDomainNamePatternNotSpecified=A regex para determinar o nome do domínio ({0}) n�o foi espeficicada nas
			// configura��es do gerador.
			// Verifique o arquivo ApplicationContext.xml!
			throw new TemplateRulesException(FreemarkerTemplateRules.mf.format("filewriter.regexDomainNamePatternNotSpecified",
					FreemarkerTemplateRules.PROP_REGEX_DOMAIN_NAME_PATTERN, javaClass.getName()));
		}
		
		final String className = javaClass.getName();
		
		domainName = className.replaceAll(fileNamePattern, FileWriterFactory.REGEX_GROUP1_REPLACEMENT);
		return domainName;
		
	} else {
		return null;
		
	}
	
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:35,代码来源:FreemarkerTemplateRules.java

示例4: getRegexSearcher

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
 * Cria um searcher baseado em regex
 * 
 * @param regexFilter
 * @return
 */
protected Searcher getRegexSearcher(final String regexFilter) {
	Searcher searcher = new Searcher() {
		public boolean eval(JavaClass cls) {
			String nome = cls.getName();
			return nome.matches(regexFilter);
			// return true;
		}
	};
	return searcher;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:17,代码来源:DomainModelLoaderFactory.java

示例5: getDomainName

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
 * Recupera o nome da entidade de domínio
 * 
 * @param templateRules
 * @param javaClass
 * @return
 * @throws GeradorException
 */
public String getDomainName(JavaClass javaClass) throws GeradorException {

	if (javaClass != null) {

		String domainName;
		String fileNamePattern = getProperties().get(PROP_REGEX_DOMAIN_NAME_PATTERN);

		if (StringUtils.isEmpty(fileNamePattern)) {
			// filewriter.regexDomainNamePatternNotSpecified=A regex para determinar o nome do domínio ({0}) não foi espeficicada nas configurações do gerador.
			// Verifique o arquivo ApplicationContext.xml!
			throw new TemplateRulesException(mf.format("filewriter.regexDomainNamePatternNotSpecified", PROP_REGEX_DOMAIN_NAME_PATTERN, javaClass.getName()));
		}

		String className = javaClass.getName();

		domainName = className.replaceAll(fileNamePattern, FileWriterFactory.REGEX_GROUP1_REPLACEMENT);
		return domainName;

	}else{
		return null;

	}

}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:33,代码来源:FreemarkerTemplateRules.java

示例6: createServiceDescriptor

import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
protected ServiceDescriptor createServiceDescriptor( JavaClass sourceType )
    throws Exception
{
    getLog().info( "Analyzing " + sourceType.getName() );
    ServiceDescriptor serviceDescriptor = new ServiceDescriptor();
    serviceDescriptor.setName( sourceType.getName() );
    Class<?> byteClass;
    try
    {
        byteClass = this.projectClassloader.loadClass( sourceType.getFullyQualifiedName() );
    }
    catch ( ClassNotFoundException e )
    {
        throw new MavenReportException( "Failed to load class " + sourceType.getName()
            + " - did you forget to invoke compile (e.g. mvn verify site)?", e );
    }
    Path serviceBasePath = byteClass.getAnnotation( Path.class );
    if ( serviceBasePath != null )
    {
        serviceDescriptor.setBasePath( serviceBasePath.value() );
    }
    GenericType<?> byteType = this.reflectionUtil.createGenericType( byteClass );
    serviceDescriptor.setJavaType( new JType( byteType, sourceType, this.reflectionUtil, this.javaDocHelper ) );
    serviceDescriptor.setDescription( this.javaDocHelper.parseJavaDoc( sourceType, byteType,
                                                                       sourceType.getComment() ) );
    Consumes consumes = this.annotationUtil.getTypeAnnotation( byteClass, Consumes.class );
    addConsumes( serviceDescriptor.getConsumes(), consumes );
    Produces produces = this.annotationUtil.getTypeAnnotation( byteClass, Produces.class );
    addProduces( serviceDescriptor.getProduces(), produces );
    for ( Method byteMethod : byteClass.getMethods() )
    {
        getLog().debug( "Analyzing method " + byteMethod.toString() );
        OperationDescriptor operationDescriptor = createOperationDescriptor( serviceDescriptor, byteMethod );
        if ( operationDescriptor != null )
        {
            getLog().debug( "Method has been detected as service operation." );
            serviceDescriptor.getOperations().add( operationDescriptor );
        }
    }
    Collections.sort( serviceDescriptor.getOperations() );
    return serviceDescriptor;
}
 
开发者ID:mojohaus,项目名称:servicedocgen-maven-plugin,代码行数:43,代码来源:Analyzer.java


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