本文整理了Java中org.codehaus.modello.model.Version.inside()
方法的一些代码示例,展示了Version.inside()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.inside()
方法的具体详情如下:
包路径:org.codehaus.modello.model.Version
类名称:Version
方法名:inside
暂无
代码示例来源:origin: org.codehaus.modello/modello-core
public List<ModelInterface> getInterfaces( Version version )
{
List<ModelInterface> interfaceList = new ArrayList<ModelInterface>();
for ( ModelInterface currentInterface : interfaces )
{
if ( version.inside( currentInterface.getVersionRange() ) )
{
interfaceList.add( currentInterface );
}
}
return interfaceList;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public List<ModelClass> getClasses( Version version )
{
List<ModelClass> classList = new ArrayList<ModelClass>();
for ( ModelClass currentClass : classes )
{
if ( version.inside( currentClass.getVersionRange() ) )
{
classList.add( currentClass );
}
}
return classList;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public List<ModelField> getAllFields( Version version, boolean withInheritedField )
{
List<ModelField> allFieldsList = new ArrayList<ModelField>();
List<ModelField> fieldList = new ArrayList<ModelField>();
for ( ModelField currentField : getAllFields( withInheritedField ) )
{
if ( version.inside( currentField.getVersionRange() ) )
{
allFieldsList.add( currentField );
}
}
for ( ModelField currentField : allFieldsList )
{
if ( version.inside( currentField.getVersionRange() ) )
{
fieldList.add( currentField );
}
}
return fieldList;
}
代码示例来源:origin: org.codehaus.modello/modello-core
/**
* Returns the list of all fields in this class for a specific version.
*
* It does not include the fields of super classes.
*
* @param version the specific version
* @return Returns the list of all fields in this class. It does not include the
* fields of super classes.
*/
public List<ModelField> getFields( Version version )
{
List<ModelField> fieldList = new ArrayList<ModelField>();
for ( ModelField currentField : getAllFields() )
{
if ( version.inside( currentField.getVersionRange() ) )
{
fieldList.add( currentField );
}
}
return fieldList;
}
代码示例来源:origin: org.codehaus.modello/modello-core
private ModelInterface getModelInterface( String type, VersionRange versionRange )
{
List<ModelInterface> interfaceList = interfaceMap.get( type );
if ( interfaceList != null )
{
for ( ModelInterface modelInterface : interfaceList )
{
if ( versionRange.getFromVersion().inside( modelInterface.getVersionRange() )
&& versionRange.getToVersion().inside( modelInterface.getVersionRange() ) )
{
return modelInterface;
}
}
}
return null;
}
代码示例来源:origin: org.codehaus.modello/modello-core
private ModelClass getModelClass( String type, VersionRange versionRange )
{
List<ModelClass> classList = classMap.get( type );
ModelClass value = null;
if ( classList != null )
{
for ( ModelClass modelClass : classList )
{
if ( versionRange.getFromVersion().inside( modelClass.getVersionRange() )
&& versionRange.getToVersion().inside( modelClass.getVersionRange() ) )
{
value = modelClass;
}
}
}
return value;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public List<CodeSegment> getCodeSegments( VersionRange versionRange )
{
List<CodeSegment> codeSegments = getAllCodeSegments();
List<CodeSegment> codeSegmentsList = new ArrayList<CodeSegment>();
if ( codeSegments != null )
{
for ( CodeSegment codeSegment : codeSegments )
{
if ( versionRange.getFromVersion().inside( codeSegment.getVersionRange() )
&& versionRange.getToVersion().inside( codeSegment.getVersionRange() ) )
{
codeSegmentsList.add( codeSegment );
}
}
}
return codeSegmentsList;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public ModelField getField( String type, VersionRange versionRange )
{
List<ModelField> fieldList = fieldMap.get( type );
if ( fieldList != null )
{
for ( ModelField modelField : fieldList )
{
if ( versionRange.getFromVersion().inside( modelField.getVersionRange() )
&& versionRange.getToVersion().inside( modelField.getVersionRange() ) )
{
return modelField;
}
}
}
throw new ModelloRuntimeException( "There are no field '" + type + "' in version range '" + versionRange.toString() + "'." );
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-converters
if ( toVersion != null && !toVersion.inside( modelClass.getVersionRange() ) )
if ( toVersion != null && !toVersion.inside( modelField.getVersionRange() ) )
内容来源于网络,如有侵权,请联系作者删除!