# ClassPathResource constructor

ClassPathResource(

1. String packageUri

)

Provides access to resources, classes, methods, and fields located in a package's classpath.

A ClassPathResource abstracts the ability to query package-level declarations such as classes, methods, and fields. This provides a better api for developers who wants to explore the classpath of a package.

### Example

    void main() {
      final resource = MyClassPathResource('package:my_app/src/models/user.dart');

      // Get package metadata
      final pkg = resource.getPackage();
      print('Package: ${pkg.name}');

      // Lookup a specific class
      final userClass = resource.getClass(User);

      // List all classes in the package
      final classes = resource.getClasses();
      print('Classes: ${classes.map((c) => c.name).toList()}');

      // Retrieve top-level methods
      final methods = resource.getMethods();
      print('Methods: ${methods.map((m) => m.name).toList()}');
    }

This class is abstract and must be implemented by subclasses that define how to load and resolve package resources.

## Implementation

    ClassPathResource(this.packageUri);