Java Doc for ClasspathEntry.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jdt » org.eclipse.jdt.internal.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.internal.core.ClasspathEntry

ClasspathEntry
public class ClasspathEntry implements IClasspathEntry(Code)

See Also:   IClasspathEntry

Inner Class :static class UnknownXmlElements

Field Summary
final public static  IPath[]EXCLUDE_NONE
    
final public static  IPath[]INCLUDE_ALL
    
final public static  intK_OUTPUT
     A constant indicating an output location.
final public static  IAccessRule[]NO_ACCESS_RULES
    
final public static  IClasspathAttribute[]NO_EXTRA_ATTRIBUTES
    
final public static  StringTAG_ACCESSIBLE
    
final public static  StringTAG_ACCESS_RULE
    
final public static  StringTAG_ACCESS_RULES
    
final public static  StringTAG_ATTRIBUTE
    
final public static  StringTAG_ATTRIBUTES
    
final public static  StringTAG_ATTRIBUTE_NAME
    
final public static  StringTAG_ATTRIBUTE_VALUE
    
final public static  StringTAG_CLASSPATH
    
final public static  StringTAG_CLASSPATHENTRY
    
final public static  StringTAG_COMBINE_ACCESS_RULES
    
final public static  StringTAG_DISCOURAGED
    
final public static  StringTAG_EXCLUDING
    
final public static  StringTAG_EXPORTED
    
final public static  StringTAG_IGNORE_IF_BETTER
    
final public static  StringTAG_INCLUDING
    
final public static  StringTAG_KIND
    
final public static  StringTAG_NON_ACCESSIBLE
    
final public static  StringTAG_OUTPUT
    
final public static  StringTAG_PATH
    
final public static  StringTAG_PATTERN
    
final public static  StringTAG_ROOTPATH
    
final public static  StringTAG_SOURCEPATH
    
public  intcontentKind
     Describes the kind of package fragment roots found on this classpath entry - either K_BINARY or K_SOURCE or K_OUTPUT.
public  intentryKind
    
 IClasspathAttribute[]extraAttributes
    
public  booleanisExported
    
public  IPathpath
     The meaning of the path of a classpath entry depends on its entry kind:
  • Source code in the current project (CPE_SOURCE) - The path associated with this entry is the absolute path to the root folder.
public  IPathsourceAttachmentPath
     Describes the path to the source archive associated with this classpath entry, or null if this classpath entry has no source attachment.

Only library and variable classpath entries may have source attachments. For library classpath entries, the result path (if present) locates a source archive.

public  IPathsourceAttachmentRootPath
     Describes the path within the source archive where package fragments are located.
public  IPathspecificOutputLocation
    

Constructor Summary
public  ClasspathEntry(int contentKind, int entryKind, IPath path, IPath[] inclusionPatterns, IPath[] exclusionPatterns, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, IPath specificOutputLocation, boolean isExported, IAccessRule[] accessRules, boolean combineAccessRules, IClasspathAttribute[] extraAttributes)
     Creates a class path entry of the specified kind with the given path.

Method Summary
public  booleancombineAccessRules()
    
public  ClasspathEntrycombineWith(ClasspathEntry referringEntry)
    
static  IAccessRule[]decodeAccessRules(NodeList list)
    
static  IClasspathAttribute[]decodeExtraAttributes(NodeList attributes)
    
public static  IClasspathEntryelementDecode(Element element, IJavaProject project, Map unknownElements)
    
public  voidelementEncode(XMLWriter writer, IPath projectPath, boolean indent, boolean newLine, Map unknownElements)
     Returns the XML encoding of the class path.
 voidencodeAccessRules(XMLWriter writer, boolean indent, boolean newLine)
    
 voidencodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine)
    
public  booleanequals(Object object)
     Returns true if the given object is a classpath entry with equivalent attributes.
public  char[][]fullExclusionPatternChars()
    
public  char[][]fullInclusionPatternChars()
    
public  AccessRuleSetgetAccessRuleSet()
    
public  IAccessRule[]getAccessRules()
    
public static  IAccessRule[]getAccessRules(IPath[] accessibleFiles, IPath[] nonAccessibleFiles)
    
public static  NodeListgetChildAttributes(String childName, NodeList children, boolean[] foundChildren)
    
public  intgetContentKind()
    
public  intgetEntryKind()
    
public  IPath[]getExclusionPatterns()
    
public  IClasspathAttribute[]getExtraAttributes()
    
public  IPath[]getInclusionPatterns()
    
public  IPathgetOutputLocation()
    
public  IPathgetPath()
    
public  IClasspathEntrygetResolvedEntry()
    
public  IPathgetSourceAttachmentPath()
    
public  IPathgetSourceAttachmentRootPath()
    
public  inthashCode()
    
public  booleanisExported()
    
public  booleanisOptional()
    
static  intkindFromString(String kindStr)
     Returns the kind of a PackageFragmentRoot from its String form.
static  StringkindToString(int kind)
     Returns a String for the kind of a class path entry.
public  StringrootID()
    
public  StringtoString()
     Returns a printable representation of this classpath entry.
public static  IJavaModelStatusvalidateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation)
     Validate a given classpath and output location for a project, using the following rules:
  • Classpath entries cannot collide with each other; that is, all entry paths must be unique.
  • The project output location path cannot be null, must be absolute and located inside the project.
  • Specific output locations (specified on source entries) can be null, if not they must be located inside the project,
  • A project entry cannot refer to itself directly (that is, a project cannot prerequisite itself).
  • Classpath entries or output locations cannot coincidate or be nested in each other, except for the following scenarii listed below:
    • A source folder can coincidate with its own output location, in which case this output can then contain library archives. However, a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it.
public static  IJavaModelStatusvalidateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean recurseInContainers)
     Returns a Java model status describing the problem related to this classpath entry if any, a status object with code IStatus.OK if the entry is fine (that is, if the given classpath entry denotes a valid element to be referenced onto a classpath).

Field Detail
EXCLUDE_NONE
final public static IPath[] EXCLUDE_NONE(Code)



INCLUDE_ALL
final public static IPath[] INCLUDE_ALL(Code)



K_OUTPUT
final public static int K_OUTPUT(Code)
A constant indicating an output location.



NO_ACCESS_RULES
final public static IAccessRule[] NO_ACCESS_RULES(Code)



NO_EXTRA_ATTRIBUTES
final public static IClasspathAttribute[] NO_EXTRA_ATTRIBUTES(Code)



TAG_ACCESSIBLE
final public static String TAG_ACCESSIBLE(Code)



TAG_ACCESS_RULE
final public static String TAG_ACCESS_RULE(Code)



TAG_ACCESS_RULES
final public static String TAG_ACCESS_RULES(Code)



TAG_ATTRIBUTE
final public static String TAG_ATTRIBUTE(Code)



TAG_ATTRIBUTES
final public static String TAG_ATTRIBUTES(Code)



TAG_ATTRIBUTE_NAME
final public static String TAG_ATTRIBUTE_NAME(Code)



TAG_ATTRIBUTE_VALUE
final public static String TAG_ATTRIBUTE_VALUE(Code)



TAG_CLASSPATH
final public static String TAG_CLASSPATH(Code)



TAG_CLASSPATHENTRY
final public static String TAG_CLASSPATHENTRY(Code)



TAG_COMBINE_ACCESS_RULES
final public static String TAG_COMBINE_ACCESS_RULES(Code)



TAG_DISCOURAGED
final public static String TAG_DISCOURAGED(Code)



TAG_EXCLUDING
final public static String TAG_EXCLUDING(Code)



TAG_EXPORTED
final public static String TAG_EXPORTED(Code)



TAG_IGNORE_IF_BETTER
final public static String TAG_IGNORE_IF_BETTER(Code)



TAG_INCLUDING
final public static String TAG_INCLUDING(Code)



TAG_KIND
final public static String TAG_KIND(Code)



TAG_NON_ACCESSIBLE
final public static String TAG_NON_ACCESSIBLE(Code)



TAG_OUTPUT
final public static String TAG_OUTPUT(Code)



TAG_PATH
final public static String TAG_PATH(Code)



TAG_PATTERN
final public static String TAG_PATTERN(Code)



TAG_ROOTPATH
final public static String TAG_ROOTPATH(Code)



TAG_SOURCEPATH
final public static String TAG_SOURCEPATH(Code)



contentKind
public int contentKind(Code)
Describes the kind of package fragment roots found on this classpath entry - either K_BINARY or K_SOURCE or K_OUTPUT.



entryKind
public int entryKind(Code)
Describes the kind of classpath entry - one of CPE_PROJECT, CPE_LIBRARY, CPE_SOURCE, CPE_VARIABLE or CPE_CONTAINER



extraAttributes
IClasspathAttribute[] extraAttributes(Code)



isExported
public boolean isExported(Code)
The export flag



path
public IPath path(Code)
The meaning of the path of a classpath entry depends on its entry kind:
  • Source code in the current project (CPE_SOURCE) - The path associated with this entry is the absolute path to the root folder.
  • A binary library in the current project (CPE_LIBRARY) - the path associated with this entry is the absolute path to the JAR (or root folder), and in case it refers to an external JAR, then there is no associated resource in the workbench.
  • A required project (CPE_PROJECT) - the path of the entry denotes the path to the corresponding project resource.
  • A variable entry (CPE_VARIABLE) - the first segment of the path is the name of a classpath variable. If this classpath variable is bound to the path P, the path of the corresponding classpath entry is computed by appending to P the segments of the returned path without the variable.
  • A container entry (CPE_CONTAINER) - the first segment of the path is denoting the unique container identifier (for which a ClasspathContainerInitializer could be registered), and the remaining segments are used as additional hints for resolving the container entry to an actual IClasspathContainer.



sourceAttachmentPath
public IPath sourceAttachmentPath(Code)
Describes the path to the source archive associated with this classpath entry, or null if this classpath entry has no source attachment.

Only library and variable classpath entries may have source attachments. For library classpath entries, the result path (if present) locates a source archive. For variable classpath entries, the result path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a classpath variable.




sourceAttachmentRootPath
public IPath sourceAttachmentRootPath(Code)
Describes the path within the source archive where package fragments are located. An empty path indicates that packages are located at the root of the source archive. Returns a non-null value if and only if getSourceAttachmentPath returns a non-null value.



specificOutputLocation
public IPath specificOutputLocation(Code)
Specific output location (for this source entry)




Constructor Detail
ClasspathEntry
public ClasspathEntry(int contentKind, int entryKind, IPath path, IPath[] inclusionPatterns, IPath[] exclusionPatterns, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, IPath specificOutputLocation, boolean isExported, IAccessRule[] accessRules, boolean combineAccessRules, IClasspathAttribute[] extraAttributes)(Code)
Creates a class path entry of the specified kind with the given path.




Method Detail
combineAccessRules
public boolean combineAccessRules()(Code)



combineWith
public ClasspathEntry combineWith(ClasspathEntry referringEntry)(Code)
Used to perform export/restriction propagation across referring projects/containers



decodeAccessRules
static IAccessRule[] decodeAccessRules(NodeList list)(Code)



decodeExtraAttributes
static IClasspathAttribute[] decodeExtraAttributes(NodeList attributes)(Code)



elementDecode
public static IClasspathEntry elementDecode(Element element, IJavaProject project, Map unknownElements)(Code)



elementEncode
public void elementEncode(XMLWriter writer, IPath projectPath, boolean indent, boolean newLine, Map unknownElements)(Code)
Returns the XML encoding of the class path.



encodeAccessRules
void encodeAccessRules(XMLWriter writer, boolean indent, boolean newLine)(Code)



encodeExtraAttributes
void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine)(Code)



equals
public boolean equals(Object object)(Code)
Returns true if the given object is a classpath entry with equivalent attributes.



fullExclusionPatternChars
public char[][] fullExclusionPatternChars()(Code)



fullInclusionPatternChars
public char[][] fullInclusionPatternChars()(Code)



getAccessRuleSet
public AccessRuleSet getAccessRuleSet()(Code)



getAccessRules
public IAccessRule[] getAccessRules()(Code)

See Also:   IClasspathEntry.getAccessRules



getAccessRules
public static IAccessRule[] getAccessRules(IPath[] accessibleFiles, IPath[] nonAccessibleFiles)(Code)



getChildAttributes
public static NodeList getChildAttributes(String childName, NodeList children, boolean[] foundChildren)(Code)



getContentKind
public int getContentKind()(Code)

See Also:   IClasspathEntry



getEntryKind
public int getEntryKind()(Code)

See Also:   IClasspathEntry



getExclusionPatterns
public IPath[] getExclusionPatterns()(Code)

See Also:   IClasspathEntry.getExclusionPatterns



getExtraAttributes
public IClasspathAttribute[] getExtraAttributes()(Code)



getInclusionPatterns
public IPath[] getInclusionPatterns()(Code)

See Also:   IClasspathEntry.getExclusionPatterns



getOutputLocation
public IPath getOutputLocation()(Code)

See Also:   IClasspathEntry.getOutputLocation



getPath
public IPath getPath()(Code)

See Also:   IClasspathEntry



getResolvedEntry
public IClasspathEntry getResolvedEntry()(Code)

See Also:   IClasspathEntry



getSourceAttachmentPath
public IPath getSourceAttachmentPath()(Code)

See Also:   IClasspathEntry



getSourceAttachmentRootPath
public IPath getSourceAttachmentRootPath()(Code)

See Also:   IClasspathEntry



hashCode
public int hashCode()(Code)
Returns the hash code for this classpath entry



isExported
public boolean isExported()(Code)

See Also:   IClasspathEntry.isExported



isOptional
public boolean isOptional()(Code)



kindFromString
static int kindFromString(String kindStr)(Code)
Returns the kind of a PackageFragmentRoot from its String form.



kindToString
static String kindToString(int kind)(Code)
Returns a String for the kind of a class path entry.



rootID
public String rootID()(Code)
Answers an ID which is used to distinguish entries during package fragment root computations



toString
public String toString()(Code)
Returns a printable representation of this classpath entry.



validateClasspath
public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation)(Code)
Validate a given classpath and output location for a project, using the following rules:
  • Classpath entries cannot collide with each other; that is, all entry paths must be unique.
  • The project output location path cannot be null, must be absolute and located inside the project.
  • Specific output locations (specified on source entries) can be null, if not they must be located inside the project,
  • A project entry cannot refer to itself directly (that is, a project cannot prerequisite itself).
  • Classpath entries or output locations cannot coincidate or be nested in each other, except for the following scenarii listed below:
    • A source folder can coincidate with its own output location, in which case this output can then contain library archives. However, a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it.
    • A source/library folder can be nested in any source folder as long as the nested folder is excluded from the enclosing one.
    • An output location can be nested in a source folder, if the source folder coincidates with the project itself, or if the output location is excluded from the source folder.
Note that the classpath entries are not validated automatically. Only bound variables or containers are considered in the checking process (this allows to perform a consistency check on a classpath which has references to yet non existing projects, folders, ...).

This validation is intended to anticipate classpath issues prior to assigning it to a project. In particular, it will automatically be performed during the classpath setting operation (if validation fails, the classpath setting will not complete).


Parameters:
  javaProject - the given java project
Parameters:
  rawClasspath - a given classpath
Parameters:
  projectOutputLocation - a given output location a status object with code IStatus.OK ifthe given classpath and output location are compatible, otherwise a statusobject indicating what is wrong with the classpath or output location




validateClasspathEntry
public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean recurseInContainers)(Code)
Returns a Java model status describing the problem related to this classpath entry if any, a status object with code IStatus.OK if the entry is fine (that is, if the given classpath entry denotes a valid element to be referenced onto a classpath).
Parameters:
  project - the given java project
Parameters:
  entry - the given classpath entry
Parameters:
  checkSourceAttachment - a flag to determine if source attachement should be checked
Parameters:
  recurseInContainers - flag indicating whether validation should be applied to container entries recursively a java model status describing the problem related to this classpath entry if any, a status object with code IStatus.OK if the entry is fine



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.