org.springframework.roo.classpath.operations
Class ClasspathOperationsImpl

java.lang.Object
  extended by org.springframework.roo.classpath.operations.ClasspathOperationsImpl
All Implemented Interfaces:
ClasspathOperations

@Service
public class ClasspathOperationsImpl
extends Object
implements ClasspathOperations

OSGi implementation of ClasspathOperations.

Since:
1.2.0
Author:
Andrew Swan

Constructor Summary
ClasspathOperationsImpl()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext context)
           
 void createClass(org.springframework.roo.model.JavaType name, boolean rooAnnotations, org.springframework.roo.project.LogicalPath path, org.springframework.roo.model.JavaType superclass, org.springframework.roo.model.JavaType implementsType, boolean createAbstract, boolean permitReservedWords)
          Creates a new Java class source file in any project path.
 void createConstructor(org.springframework.roo.model.JavaType name, Set<String> fields)
          Creates a new constructor in the specified class with the fields provided.
 void createEnum(org.springframework.roo.model.JavaType name, org.springframework.roo.project.LogicalPath path, boolean permitReservedWords)
          Creates a new Java enum source file in any project path.
 void createInterface(org.springframework.roo.model.JavaType name, org.springframework.roo.project.LogicalPath path, boolean permitReservedWords)
          Creates a new Java interface source file in any project path.
protected  void deactivate(org.osgi.service.component.ComponentContext context)
           
 void enumConstant(org.springframework.roo.model.JavaType name, org.springframework.roo.model.JavaSymbolName fieldName, boolean permitReservedWords)
          Inserts a new enum constant into an enum.
 void focus(org.springframework.roo.model.JavaType type)
          Changes the focus to the given type.
 boolean isProjectAvailable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathOperationsImpl

public ClasspathOperationsImpl()
Method Detail

createClass

public void createClass(org.springframework.roo.model.JavaType name,
                        boolean rooAnnotations,
                        org.springframework.roo.project.LogicalPath path,
                        org.springframework.roo.model.JavaType superclass,
                        org.springframework.roo.model.JavaType implementsType,
                        boolean createAbstract,
                        boolean permitReservedWords)
Description copied from interface: ClasspathOperations
Creates a new Java class source file in any project path.

Specified by:
createClass in interface ClasspathOperations
Parameters:
name - the name of the class to create
rooAnnotations - whether the generated class should have common Roo annotations
path - the source directory in which to create the class
superclass - the superclass (defaults to Object)
implementsType - the interface to implement
createAbstract - whether the generated class should be marked as abstract
permitReservedWords - whether reserved words are ignored by Roo

createConstructor

public void createConstructor(org.springframework.roo.model.JavaType name,
                              Set<String> fields)
Description copied from interface: ClasspathOperations
Creates a new constructor in the specified class with the fields provided.

If the set of fields is null, a public no-arg constructor will be created if not already present. If fields is not null but empty or if all of the supplied fields do not exist in the class, the method returns silently.

Specified by:
createConstructor in interface ClasspathOperations
Parameters:
name - the name of the class (required).
fields - the fields to include in the constructor.

createEnum

public void createEnum(org.springframework.roo.model.JavaType name,
                       org.springframework.roo.project.LogicalPath path,
                       boolean permitReservedWords)
Description copied from interface: ClasspathOperations
Creates a new Java enum source file in any project path.

Specified by:
createEnum in interface ClasspathOperations
Parameters:
name - the name of the enum to create
path - the source directory in which to create the enum
permitReservedWords - whether reserved words are ignored by Roo

createInterface

public void createInterface(org.springframework.roo.model.JavaType name,
                            org.springframework.roo.project.LogicalPath path,
                            boolean permitReservedWords)
Description copied from interface: ClasspathOperations
Creates a new Java interface source file in any project path.

Specified by:
createInterface in interface ClasspathOperations
Parameters:
name - the name of the interface to create
path - the source directory in which to create the interface
permitReservedWords - whether reserved words are ignored by Roo

enumConstant

public void enumConstant(org.springframework.roo.model.JavaType name,
                         org.springframework.roo.model.JavaSymbolName fieldName,
                         boolean permitReservedWords)
Description copied from interface: ClasspathOperations
Inserts a new enum constant into an enum.

Specified by:
enumConstant in interface ClasspathOperations
Parameters:
name - the enum class to receive this field
fieldName - the name of the constant
permitReservedWords - whether reserved words are ignored by Roo

focus

public void focus(org.springframework.roo.model.JavaType type)
Description copied from interface: ClasspathOperations
Changes the focus to the given type.

Specified by:
focus in interface ClasspathOperations
Parameters:
type - the type to focus on (required)

isProjectAvailable

public boolean isProjectAvailable()
Specified by:
isProjectAvailable in interface ClasspathOperations

activate

protected void activate(org.osgi.service.component.ComponentContext context)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext context)


Copyright © 2009–2015. All rights reserved.