use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.
the class DfGapileProcess method createReflector.
protected DfGapileClassReflector createReflector(String gapileDirectory) {
final DfBasicProperties prop = getBasicProperties();
final String outputDirectory = prop.getGenerateOutputDirectory();
final String packageBase = prop.getPackageBase();
final DfLanguageDependency lang = prop.getLanguageDependency();
final DfLanguageClassPackage classPackage = lang.getLanguageClassPackage();
final DfLanguageGrammar grammar = lang.getLanguageGrammar();
return new DfGapileClassReflector(outputDirectory, packageBase, classPackage, grammar, gapileDirectory);
}
use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.
the class Column method isJavaNativeUtilList.
public boolean isJavaNativeUtilList() {
// only for array type
final String javaNative = getJavaNative();
final DfLanguageGrammar grammar = getLanguageDependency().getLanguageGrammar();
final String beginMark = grammar.getGenericBeginMark();
final String endMark = grammar.getGenericEndMark();
return javaNative.equals("java.util.List") || (Srl.startsWith(javaNative, "List" + beginMark) && Srl.endsWith(javaNative, endMark));
}
use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.
the class Column method getJavaNativeTypeLiteral.
public String getJavaNativeTypeLiteral() {
final String javaNative = getJavaNative();
final DfLanguageGrammar grammar = getLanguageDependency().getLanguageGrammar();
// for example, List<String>
final String pureNative = Srl.substringFirstFront(javaNative, "<");
return grammar.buildClassTypeLiteral(pureNative);
}
use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.
the class ForeignKey method doGetForeignPropertyEntityDefinitionType.
protected String doGetForeignPropertyEntityDefinitionType(String extendedEntityClassName, String propertyAccessType) {
if (propertyAccessType != null) {
// needs import definition
final String simpleName = Srl.substringLastRear(propertyAccessType, ".");
final DfLanguageGrammar grammar = getBasicProperties().getLanguageDependency().getLanguageGrammar();
return simpleName + grammar.buildGenericOneClassHint(extendedEntityClassName);
}
return extendedEntityClassName;
}
Aggregations