I just found this little piece of code to create DDL source code.
SELECT dbms_metadata.get_ddl(replace(OBJECT_TYPE, ' ', '_'), OBJECT_NAME,OWNER) as DDL_SOURCE_CODE FROM ALL_OBJECTS WHERE OBJECT_TYPE IN ('SEQUENCE', 'TABLE', 'INDEX', 'VIEW', 'DATABASE LINK', 'MATERIALIZED VIEW', 'FUNCTION', 'PROCEDURE', 'PACKAGE', 'PACKAGE BODY' ) AND OWNER = '#SCHMEA_NAME#';