org.gvnix.flex.as.classpath.as3parser
Class As3ParserMetadataProvider

java.lang.Object
  extended by org.gvnix.flex.as.classpath.as3parser.As3ParserMetadataProvider
All Implemented Interfaces:
ASMutablePhysicalTypeMetadataProvider, ASPhysicalTypeMetadataProvider, org.springframework.roo.file.monitor.event.FileEventListener, org.springframework.roo.metadata.MetadataProvider

@Service
public class As3ParserMetadataProvider
extends Object
implements ASMutablePhysicalTypeMetadataProvider, org.springframework.roo.file.monitor.event.FileEventListener

Parser-based MetadataProvider for ActionScript source files.

Author:
Jeremy Grelle

Field Summary
protected static Logger LOGGER
           
 
Constructor Summary
As3ParserMetadataProvider()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext cContext)
           
 void createPhysicalType(ASPhysicalTypeMetadata toCreate)
           
 String findIdentifier(ActionScriptType actionScriptType)
          Attempts to locate the specified ActionScriptType by searching the physical disk (does not search for existing ASPhysicalTypeMetadata).
 org.springframework.roo.metadata.MetadataItem get(String metadataIdentificationString)
           
 org.springframework.roo.process.manager.FileManager getFileManager()
           
 org.springframework.roo.metadata.MetadataDependencyRegistry getMetadataDependencyRegistry()
           
 org.springframework.roo.metadata.MetadataService getMetadataService()
           
 org.springframework.roo.project.PathResolver getPathResolver()
           
 String getProvidesType()
           
 void onFileEvent(org.springframework.roo.file.monitor.event.FileEvent fileEvent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER
Constructor Detail

As3ParserMetadataProvider

public As3ParserMetadataProvider()
Method Detail

activate

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

createPhysicalType

public void createPhysicalType(ASPhysicalTypeMetadata toCreate)
Specified by:
createPhysicalType in interface ASMutablePhysicalTypeMetadataProvider

findIdentifier

public String findIdentifier(ActionScriptType actionScriptType)
Description copied from interface: ASPhysicalTypeMetadataProvider
Attempts to locate the specified ActionScriptType by searching the physical disk (does not search for existing ASPhysicalTypeMetadata).

This method resolves the issue that a ActionScriptType is location independent, yet ASPhysicalTypeIdentifier instances are location dependent (ie a ASPhysicalTypeIdentifier relates to a given physical file, whereas a ActionScriptType simply assumes the type is available from the classpath). This resolution is achieved by first scanning the PathResolver.getSourcePaths() locations, and then scanning any locations provided by the ClasspathProvidingProjectMetadata (if the ProjectMetadata implements this extended interface).

Due to the "best effort" basis of classpath resolution, callers should not rely on complex classpath resolution outcomes. However, callers can rely on robust determination of types defined in Paths from PathResolver.getSourcePaths(), using the Path order returned by that method.

Specified by:
findIdentifier in interface ASPhysicalTypeMetadataProvider
Parameters:
actionScriptType - the type to locate (required)
Returns:
the string (in ASPhysicalTypeIdentifier format) if found, or null if not found

get

public org.springframework.roo.metadata.MetadataItem get(String metadataIdentificationString)
Specified by:
get in interface org.springframework.roo.metadata.MetadataProvider

getProvidesType

public String getProvidesType()
Specified by:
getProvidesType in interface org.springframework.roo.metadata.MetadataProvider

onFileEvent

public void onFileEvent(org.springframework.roo.file.monitor.event.FileEvent fileEvent)
Specified by:
onFileEvent in interface org.springframework.roo.file.monitor.event.FileEventListener

getFileManager

public org.springframework.roo.process.manager.FileManager getFileManager()

getMetadataService

public org.springframework.roo.metadata.MetadataService getMetadataService()

getMetadataDependencyRegistry

public org.springframework.roo.metadata.MetadataDependencyRegistry getMetadataDependencyRegistry()

getPathResolver

public org.springframework.roo.project.PathResolver getPathResolver()


Copyright © 2010–2015 Conselleria d'Infraestructures i Transport - Generalitat Valenciana. All rights reserved.