com.hyper9.simdk.codegen.impls
Class MetaTypeImpl

java.lang.Object
  extended by com.hyper9.simdk.codegen.impls.MetaTypeImpl
All Implemented Interfaces:
MetaType
Direct Known Subclasses:
EnumTypeImpl, MetaClassTypeImpl, VimServiceTypeImpl

public abstract class MetaTypeImpl
extends Object
implements MetaType


Constructor Summary
protected MetaTypeImpl(Class<?> inType, String inTypeSourceFilePath)
          Creates a new instance of the MetaTypeImpl class.
 
Method Summary
protected  void addOutImportType(String typeName)
           
protected  void addXmlTypeName()
           
 void build()
          Builds the type to be written.
 List<String> getAnnotations()
          Gets a list of this out type's annotations.
 Class<?> getInType()
          Gets the In type.
 String getInTypeSourceFilePath()
          Gets the path to the source file of the In type.
 List<MetaMethod> getMethods()
          Get this meta type's methods.
 List<String> getOutImports()
          Gets a list of the types to import for the out type.
 OutType getOutType()
          Gets the Out type.
protected  String getPathToOutFile(String rootPath)
           
 List<MetaProperty> getProperties()
          Get this meta type's properties.
protected  boolean isTypeObject(OutType outType)
           
protected static String upCaseFirstChar(String toUpCase)
           
 void writeToFile(String path)
          Writes the meta type to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hyper9.simdk.codegen.types.MetaType
getCompilationType, writeCompilationTypeContent
 

Constructor Detail

MetaTypeImpl

protected MetaTypeImpl(Class<?> inType,
                       String inTypeSourceFilePath)
Creates a new instance of the MetaTypeImpl class.

Parameters:
inType - The VMware type the MetaType is based on.
inTypeSourceFilePath - The full path to the In type's source file.
Method Detail

getInType

public Class<?> getInType()
Description copied from interface: MetaType
Gets the In type.

Specified by:
getInType in interface MetaType
Returns:
The In type.

getInTypeSourceFilePath

public String getInTypeSourceFilePath()
Description copied from interface: MetaType
Gets the path to the source file of the In type.

Specified by:
getInTypeSourceFilePath in interface MetaType
Returns:
The path to the source file of the In type.

build

public void build()
           throws Exception
Description copied from interface: MetaType
Builds the type to be written.

Specified by:
build in interface MetaType
Throws:
Exception

addXmlTypeName

protected void addXmlTypeName()

addOutImportType

protected void addOutImportType(String typeName)

getOutType

public OutType getOutType()
Description copied from interface: MetaType
Gets the Out type.

Specified by:
getOutType in interface MetaType
Returns:
The Out type.

getProperties

public List<MetaProperty> getProperties()
Description copied from interface: MetaType
Get this meta type's properties.

Specified by:
getProperties in interface MetaType
Returns:
This meta type's properties.

getMethods

public List<MetaMethod> getMethods()
Description copied from interface: MetaType
Get this meta type's methods.

Specified by:
getMethods in interface MetaType
Returns:
This meta type's methods.

upCaseFirstChar

protected static String upCaseFirstChar(String toUpCase)

getPathToOutFile

protected String getPathToOutFile(String rootPath)

isTypeObject

protected boolean isTypeObject(OutType outType)

getOutImports

public List<String> getOutImports()
Description copied from interface: MetaType
Gets a list of the types to import for the out type.

Specified by:
getOutImports in interface MetaType
Returns:
A list of the types to import for the out type.

getAnnotations

public List<String> getAnnotations()
Description copied from interface: MetaType
Gets a list of this out type's annotations.

Specified by:
getAnnotations in interface MetaType
Returns:

writeToFile

public void writeToFile(String path)
                 throws Exception
Description copied from interface: MetaType
Writes the meta type to a file.

Specified by:
writeToFile in interface MetaType
Parameters:
path - The path of the root directory to write the file.
Throws:
Exception - When an error occurs.


Copyright © 2009-2010 Hyper9. All Rights Reserved.