net.officefloor.eclipse.util
Class ModelUtil

java.lang.Object
  extended by net.officefloor.eclipse.util.ModelUtil

public class ModelUtil
extends Object

Utility class for working with the Model instances.

Author:
Daniel Sagenschneider

Method Summary
static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.desk.DeskManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the DeskManagedObjectSourceModel.
static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.officefloor.OfficeFloorManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeFloorManagedObjectSourceModel.
static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.office.OfficeManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.
static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.section.SectionManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the SectionManagedObjectSourceModel.
static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(String managedObjectSourceClassName, net.officefloor.compile.properties.PropertyList properties, net.officefloor.compile.OfficeFloorCompiler compiler, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.
static net.officefloor.compile.spi.office.OfficeSection getOfficeSection(net.officefloor.model.office.OfficeSectionModel officeSection, net.officefloor.compile.OfficeFloorCompiler compiler, net.officefloor.compile.issues.CompilerIssues issues, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the OfficeSection for the OfficeSectionModel.
static net.officefloor.compile.work.WorkType<?> getWorkType(net.officefloor.model.desk.WorkModel workModel, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the WorkType for the WorkModel.
static
<S> Class<S>
obtainClass(String className, Class<S> superType, ClassLoader classLoader, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the Class by its name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWorkType

public static net.officefloor.compile.work.WorkType<?> getWorkType(net.officefloor.model.desk.WorkModel workModel,
                                                                   AbstractOfficeFloorEditor<?,?> editor)
Obtains the WorkType for the WorkModel.

Parameters:
workModel - WorkModel.
editor - AbstractOfficeFloorEditor requiring the WorkType.
Returns:
WorkType or null if issue obtaining it.

getManagedObjectType

public static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.officefloor.OfficeFloorManagedObjectSourceModel managedObjectSource,
                                                                                              AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeFloorManagedObjectSourceModel.

Parameters:
managedObjectSource - OfficeFloorManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.office.OfficeManagedObjectSourceModel managedObjectSource,
                                                                                              AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.

Parameters:
managedObjectSource - OfficeManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.section.SectionManagedObjectSourceModel managedObjectSource,
                                                                                              AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the SectionManagedObjectSourceModel.

Parameters:
managedObjectSource - SectionManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(net.officefloor.model.desk.DeskManagedObjectSourceModel managedObjectSource,
                                                                                              AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the DeskManagedObjectSourceModel.

Parameters:
managedObjectSource - DeskManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static net.officefloor.compile.managedobject.ManagedObjectType<?> getManagedObjectType(String managedObjectSourceClassName,
                                                                                              net.officefloor.compile.properties.PropertyList properties,
                                                                                              net.officefloor.compile.OfficeFloorCompiler compiler,
                                                                                              AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.

Parameters:
managedObjectSourceClassName - Class name of the ManagedObjectSource.
properties - PropertyList.
compiler - OfficeFloorCompiler.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getOfficeSection

public static net.officefloor.compile.spi.office.OfficeSection getOfficeSection(net.officefloor.model.office.OfficeSectionModel officeSection,
                                                                                net.officefloor.compile.OfficeFloorCompiler compiler,
                                                                                net.officefloor.compile.issues.CompilerIssues issues,
                                                                                AbstractOfficeFloorEditor<?,?> editor)
Obtains the OfficeSection for the OfficeSectionModel.

Parameters:
officeSection - OfficeSectionModel.
compiler - OfficeFloorCompiler.
issues - CompilerIssues.
editor - AbstractOfficeFloorEditor.
Returns:
OfficeSection or null if failed to load.

obtainClass

public static <S> Class<S> obtainClass(String className,
                                       Class<S> superType,
                                       ClassLoader classLoader,
                                       AbstractOfficeFloorEditor<?,?> editor)
Obtains the Class by its name.

Parameters:
className - Fully qualified name of the class.
superType - Type that the class must be a sub type.
classLoader - ClassLoader.
editor - AbstractOfficeFloorEditor to report issues and obtain the IProject.
Returns:
Class or null if could not obtain.


Copyright © 2005-2012. All Rights Reserved.