本文整理了Java中org.codehaus.modello.model.Model.getClass()
方法的一些代码示例,展示了Model.getClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getClass()
方法的具体详情如下:
包路径:org.codehaus.modello.model.Model
类名称:Model
方法名:getClass
暂无
代码示例来源:origin: org.codehaus.modello/modello-core
protected boolean isClassInModel( String fieldType, Model model )
{
try
{
return model.getClass( fieldType, generatedVersion ) != null;
}
catch ( Exception e )
{
}
return false;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xsd
w.addAttribute( "elementFormDefault", "qualified" );
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ),
getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-core
public ModelClass getClass( String type, Version version, boolean optionnal )
{
return getClass( type, new VersionRange( version ), optionnal );
}
代码示例来源:origin: org.codehaus.modello/modello-core
public ModelClass getClass( String type, Version version )
{
return getClass( type, new VersionRange( version ), false );
}
代码示例来源:origin: org.codehaus.modello/modello-core
/**
* Return the child fields of this class.
* @param modelClass current class
* @return the list of fields of this class
*/
protected List<ModelField> getFieldsForClass( ModelClass modelClass )
{
List<ModelField> fields = new ArrayList<ModelField>();
while ( modelClass != null )
{
fields.addAll( modelClass.getFields( getGeneratedVersion() ) );
String superClass = modelClass.getSuperClass();
if ( superClass != null )
{
modelClass = getModel().getClass( superClass, getGeneratedVersion() );
}
else
{
modelClass = null;
}
}
return fields;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xml
modelClass = modelClass.getModel().getClass( superClass, version, true );
代码示例来源:origin: org.codehaus.modello/modello-plugin-dom4j
private void writeAllClassesParser( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
writeClassParser( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-jackson
private void writeAllClassesReaders( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
if ( isTrackingSupport( clazz ) )
{
continue;
}
writeClassReaders( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xpp3
private void writeAllClassesReaders( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
if ( isTrackingSupport( clazz ) )
{
continue;
}
writeClassReaders( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xpp3
private void writeAllClassesParser( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
if ( isTrackingSupport( clazz ) )
{
continue;
}
writeClassParser( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-jackson
private void writeAllClassesParser( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
if ( isTrackingSupport( clazz ) )
{
continue;
}
writeClassParser( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-stax
/**
* Write code to parse every classes from a model.
*
* @param objectModel the model
* @param jClass the generated class source file
* @throws ModelloException
* @see {@link #writeClassParser(ModelClass, JClass, boolean)}
*/
private void writeAllClassesParser( Model objectModel, JClass jClass )
throws ModelloException
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
writeClassParser( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-core
/**
* Returns all the fields in this class and all super classes if withInheritedField equals to true.
*
* @return Returns all the fields in this class and all super classes.
*/
public List<ModelField> getAllFields( boolean withInheritedField )
{
if ( ! withInheritedField )
{
return getAllFields();
}
List<ModelField> fields = new ArrayList<ModelField>( getAllFields() );
ModelClass c = this;
while ( c.hasSuperClass() && c.isInternalSuperClass() )
{
ModelClass parent = getModel().getClass( c.getSuperClass(), getVersionRange() );
fields.addAll( parent.getAllFields() );
c = parent;
}
return fields;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-java
currentClass = getModel().getClass( superClass, getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-xdoc
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-xdoc
ModelClass fieldModelClass = getModel().getClass( assoc.getTo(), getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-core
public void validateElement()
throws ModelValidationException
{
// Check if superClass exists
if ( hasSuperClass() )
{
try
{
getModel().getClass( superClass, getVersionRange() );
isInternalSuperClass = true;
}
catch ( ModelloRuntimeException e )
{
isInternalSuperClass = false;
}
}
if ( getModel().getDefault( ModelDefault.CHECK_DEPRECATION ).getBoolean() )
{
if ( ! Version.INFINITE.equals( getVersionRange().getToVersion() )
&& getDeprecatedVersion() == null )
{
throw new ModelValidationException( "You must define the deprecated version of '" + getName() + "' class." );
}
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-converters
String root = objectModel.getRoot( getGeneratedVersion() );
ModelClass rootClass = objectModel.getClass( root, getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-java
reference = reference.getModel().getClass( reference.getSuperClass(), getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-stax
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ),
getGeneratedVersion() );
ModelField field = root.getField( value, getGeneratedVersion() );
内容来源于网络,如有侵权,请联系作者删除!